mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-26 07:10:46 +00:00
Add metrics
This commit is contained in:
@@ -1839,6 +1839,8 @@ upload_finish_cb (evhtp_request_t *req, void *arg)
|
||||
RecvFSM *fsm = arg;
|
||||
GList *ptr;
|
||||
|
||||
seaf_metric_manager_in_flight_request_dec (seaf->metric_mgr);
|
||||
|
||||
if (!fsm)
|
||||
return EVHTP_RES_OK;
|
||||
|
||||
@@ -2635,6 +2637,8 @@ upload_headers_cb (evhtp_request_t *req, evhtp_headers_t *hdr, void *arg)
|
||||
pthread_mutex_unlock (&pg_lock);
|
||||
}
|
||||
|
||||
seaf_metric_manager_in_flight_request_inc (seaf->metric_mgr);
|
||||
|
||||
/* Set up per-request hooks, so that we can read file data piece by piece. */
|
||||
evhtp_set_hook (&req->hooks, evhtp_hook_on_read, upload_read_cb, fsm);
|
||||
evhtp_set_hook (&req->hooks, evhtp_hook_on_request_fini, upload_finish_cb, fsm);
|
||||
|
Reference in New Issue
Block a user