added message processing time to C stack
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Sep 2006 03:34:15 +0000 (03:34 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Sep 2006 03:34:15 +0000 (03:34 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5942 dcc99617-32d9-48b4-a31d-7c20da2025e4

OpenSRF/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");