added message processing time to C stack
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 5 Sep 2006 03:34:15 +0000 (03:34 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 5 Sep 2006 03:34:15 +0000 (03:34 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@777 9efc2488-bf62-4759-914b-345cdb29e865

src/libstack/osrf_stack.c

index 2e5027c..4d27d7f 100644 (file)
@@ -68,6 +68,8 @@ osrfAppSession* osrf_stack_transport_handler( transport_message* msg, char* my_s
 
        osrfLogDebug( OSRF_LOG_MARK,  "We received %d messages from %s", num_msgs, msg->sender );
 
+       double starttime = get_timestamp_millis();
+
        int i;
        for( i = 0; i != num_msgs; i++ ) {
 
@@ -93,6 +95,9 @@ osrfAppSession* osrf_stack_transport_handler( transport_message* msg, char* my_s
                osrf_stack_message_handler( session, arr[i] );
        }
 
+       double duration = get_timestamp_millis() - starttime;
+       osrfLogInfo(OSRF_LOG_MARK, "Message processing duration %lf", duration);
+
        message_free( msg );
        osrfLogDebug( OSRF_LOG_MARK, "after msg delete");