Record operation activity times

This commit is contained in:
Ondřej Kuzník 2017-11-22 12:56:53 +00:00 committed by Ondřej Kuzník
parent a0ec50b33d
commit 1790018488
3 changed files with 4 additions and 0 deletions

View 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 );

View 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;

View 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",