]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Record operation activity times
authorOndřej Kuzník <ondra@mistotebe.net>
Wed, 22 Nov 2017 12:56:53 +0000 (12:56 +0000)
committerOndřej Kuzník <okuznik@symas.com>
Tue, 17 Nov 2020 17:58:14 +0000 (17:58 +0000)
servers/lloadd/operation.c
servers/lloadd/slap.h
servers/lloadd/upstream.c

index d3c5bbbd8e28ef1fdaac3044dd44be8967afbb2f..f1b057ae2ff76adddd9c53601a41ce2b200a8c8e 100644 (file)
@@ -465,6 +465,7 @@ operation_init( Connection *c, BerElement *ber )
     op->o_client = c;
     op->o_client_connid = c->c_connid;
     op->o_ber = ber;
+    op->o_start = slap_get_time();
 
     ldap_pvt_thread_mutex_init( &op->o_mutex );
     ldap_pvt_thread_mutex_init( &op->o_link_mutex );
index 4ac98431dd1d3b65049ed64bd1c4c78600488357..802c6f4b301bb9634386b97af6d7114e83150049 100644 (file)
@@ -446,6 +446,7 @@ struct Operation {
     unsigned long o_upstream_connid;
     int o_upstream_live, o_upstream_refcnt;
     ber_int_t o_upstream_msgid;
+    time_t o_last_response;
 
     /* Protects o_client, o_upstream pointers before we lock their c_mutex if
      * we don't know they are still alive */
@@ -456,6 +457,7 @@ struct Operation {
      * op->o_{client,upstream}->c_mutex */
     enum op_state o_freeing;
     ber_tag_t o_tag;
+    time_t o_start;
 
     BerElement *o_ber;
     BerValue o_request, o_ctrls;
index aa53a205c4a3ab0d0ccef15dde845d7a3241525c..a8919c12155b1a0c7a16965e4d4a67543732a582 100644 (file)
@@ -188,6 +188,7 @@ handle_one_response( Connection *c )
         }
     }
     if ( op ) {
+        op->o_last_response = slap_get_time();
         Debug( LDAP_DEBUG_STATS2, "handle_one_response: "
                 "upstream connid=%lu, processing response for "
                 "client connid=%lu, msgid=%d\n",