X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fresult.c;h=4c0304e7cb43cbd5f0b1d26e48e4b7d0b683a726;hb=a0cc1d9655da112a4d19cddf821460a4dedeed1c;hp=d958b979533c3ade5beda1ce2929a6cdcf3b0385;hpb=2d5996ac603391ddbd618425f88eb13e5e0e2cc0;p=openldap diff --git a/servers/slapd/result.c b/servers/slapd/result.c index d958b97953..4c0304e7cb 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2015 The OpenLDAP Foundation. + * Copyright 1998-2017 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,15 +40,19 @@ #if SLAP_STATS_ETIME #define ETIME_SETUP \ struct timeval now; \ + char timestr[64]; \ (void) gettimeofday( &now, NULL ); \ now.tv_sec -= op->o_time; \ now.tv_usec -= op->o_tincr; \ if ( now.tv_usec < 0 ) { \ --now.tv_sec; now.tv_usec += 1000000; \ - } -#define ETIME_LOGFMT "etime=%d.%06d " + } \ + sprintf(timestr, "qtime=%d.%06d etime=%d.%06d", \ + (int)op->o_qtime.tv_sec, (int)op->o_qtime.tv_usec, \ + (int)now.tv_sec, (int)now.tv_usec); +#define ETIME_LOGFMT "%s " #define StatslogEtime(lvl,fmt,pfx,tag,err,etxt,xtra) \ - Statslog7(lvl,fmt,pfx,tag,err,(int)now.tv_sec,(int)now.tv_usec,etxt,xtra) + Statslog6(lvl,fmt,pfx,tag,err,timestr,etxt,xtra) #else #define ETIME_SETUP #define ETIME_LOGFMT ""