From 02f499407ab23672e3be5ab02f0853006424cf05 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 9 May 2006 15:11:06 +0000 Subject: [PATCH] added request duration git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@713 9efc2488-bf62-4759-914b-345cdb29e865 --- src/gateway/osrf_json_gateway.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gateway/osrf_json_gateway.c b/src/gateway/osrf_json_gateway.c index e927462..b8e1899 100644 --- a/src/gateway/osrf_json_gateway.c +++ b/src/gateway/osrf_json_gateway.c @@ -151,6 +151,7 @@ static int osrf_json_gateway_method_handler (request_rec *r) { osrfLogInfo( OSRF_LOG_MARK, "service=%s, method=%s", service, method ); osrfAppSession* session = osrf_app_client_session_init(service); + double starttime = get_timestamp_millis(); int req_id = osrf_app_session_make_req( session, NULL, method, api_level, mparams ); osrf_message* omsg = NULL; @@ -197,6 +198,10 @@ static int osrf_json_gateway_method_handler (request_rec *r) { if(statusname) break; } + double duration = get_timestamp_millis() - starttime; + osrfLogDebug(OSRF_LOG_MARK, "gateway request took %lf seconds", duration); + + if (isXML) ap_rputs("", r); else -- 2.11.0