Commit 17900184 authored by Ondřej Kuzník's avatar Ondřej Kuzník Committed by Ondřej Kuzník
Browse files

Record operation activity times

parent a0ec50b3
......@@ -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 );
......
......@@ -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;
......
......@@ -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",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment