Opened 9 years ago

Closed 9 years ago

#3850 closed Feature Requests (invalid)

[Boost.tracer] library request

Reported by: achinkoff@… Owned by:
Milestone: Boost 1.42.0 Component: None
Version: Boost 1.41.0 Severity: Cosmetic
Keywords: tracer Cc:


[Boost.tracer] library request is founded on a desire to trace some statistics about program execution.

The sample program below demonstrates these statistics.

Sample program file:

#include <tracer.h>
void foo()
    usleep(rand() % 100000);
int main()
    for(int i = 0; i < 100; ++i)

Produced log file:

All the program time: 05265686 us (micro secs)

 Function:                       int main()
 Calls:                          0000000001 times
 Average T between calls:        0000000000 us
 Average life T:                 0005264459 us
 File:                           main.cpp
 Line:                           00000009

 Function:                       void foo()
 Calls:                          0000000100 times
 Average T between calls:        0000051665 us
 Average life T:                 0000052606 us
 File:                           main.cpp
 Line:                           00000004


TRACE_LIFETIME is a MACRO that traces some scope statistics, namely:
"Function" - the function name where the scope is;
"Calls" - number of entries into this scope;
"Average T between calls" - average time period between "Calls";
"Average life T" - average time spent in this scope.


I think it is reasonable to introduce this trace functionality into (for example) boost::tracer namespace. I had wrote tracer.h and tracer.cpp source files and I wish Boost community to consider them.

Thank You.

Change History (2)

comment:1 Changed 9 years ago by Steven Watanabe

Please bring this to the Boost developers mailing list. The trac system is intended for existing libraries.

comment:2 Changed 9 years ago by anonymous

Resolution: invalid
Status: newclosed

I propose to close this ticket, as it is a feature request to no library.

Note: See TracTickets for help on using tickets.