Full_Name: Emily Backes Version: master, 2.4 OS: URL: Submission from: (NULL) (50.113.67.84)
Here is a patch to add duration logging for operations that appears in the standard result messages of statslog. It's a reasonably small change with negligible performance implications except under pathological benchmarking conditions. It does change the quasi-machine-parsable statslog format, however, so it might not be appropriate for general 2.4 release. Example line:
54d8298c conn=1000 op=1 SEARCH RESULT tag=101 err=0 duration=0.170ms nentries=1 text=
As written, it uses a separate field in struct Operation and is entirely independent of the o_tincr functionality. Merging those has further portability problems, and is out of the scope of this feature. As a result, the overhead is two additional gettimeofday() calls per operation. The change is wrapped in #ifdef HAVE_GETTIMEOFDAY, so architectures lacking that will see no change.
I have patches versus both the master branch (which likely covers 2.5), and OPENLDAP_REL_ENG_2_4. They'll be attached momentarily, outside jitterbug's web interface. %ThThese modifications are the sole work of myself (Emily Backes) on behalf of Symas Corporation based on existing log features of OpenLDAP. Therefore, these modifications are:
Copyright 2014-2015 Symas Corporation Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP Public License.