added request duration
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 9 May 2006 15:11:06 +0000 (15:11 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 9 May 2006 15:11:06 +0000 (15:11 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@713 9efc2488-bf62-4759-914b-345cdb29e865

src/gateway/osrf_json_gateway.c

index e927462..b8e1899 100644 (file)
@@ -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("</payload>", r);
                else