ITS#9886 Report time taken to process each syncrepl message

This commit is contained in:
Ondřej Kuzník 2022-09-23 12:47:37 +01:00 committed by Quanah Gibson-Mount
parent 9134be7ecc
commit 148204839f

View file

@ -1598,6 +1598,17 @@ logerr:
if ( modlist ) {
slap_mods_free( modlist, 1 );
}
if ( LogTest( LDAP_DEBUG_SYNC ) ) {
struct timeval now;
gettimeofday( &now, NULL );
now.tv_sec -= si->si_lastcontact.tv_sec;
now.tv_usec -= si->si_lastcontact.tv_usec;
if ( now.tv_usec < 0 ) {
--now.tv_sec; now.tv_usec += 1000000;
}
Debug( LDAP_DEBUG_SYNC, "do_syncrep2: %s etime=%d.%06d\n",
si->si_ridtxt, (int)now.tv_sec, (int)now.tv_usec );
}
if ( rc )
goto done;
break;