Boost C++ Libraries: Ticket #3850: [Boost.tracer] library request https://svn.boost.org/trac10/ticket/3850 <p> [Boost.tracer] library request is founded on a desire to trace some statistics about program execution. </p> <p> The sample program below demonstrates these statistics. </p> <p> Sample program file: </p> <pre class="wiki">#include &lt;tracer.h&gt; void foo() { TRACE_LIFETIME; usleep(rand() % 100000); } int main() { TRACE_LIFETIME; for(int i = 0; i &lt; 100; ++i) foo(); } </pre><p> Produced log file: </p> <pre class="wiki">All the program time: 05265686 us (micro secs) TRACE POINT: Function: int main() Calls: 0000000001 times Average T between calls: 0000000000 us Average life T: 0005264459 us File: main.cpp Line: 00000009 TRACE POINT: Function: void foo() Calls: 0000000100 times Average T between calls: 0000051665 us Average life T: 0000052606 us File: main.cpp Line: 00000004 </pre><p> Comment: </p> <p> TRACE_LIFETIME is a MACRO that traces some scope statistics, namely: <br /> "Function" - the function name where the scope is; <br /> "Calls" - number of entries into this scope; <br /> "Average T between calls" - average time period between "Calls"; <br /> "Average life T" - average time spent in this scope. </p> <p> Conclusion: </p> <p> 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. </p> <p> Thank You. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3850 Trac 1.4.3 Steven Watanabe Sat, 27 Mar 2010 06:15:13 GMT <link>https://svn.boost.org/trac10/ticket/3850#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3850#comment:1</guid> <description> <p> Please bring this to the Boost developers mailing list. The trac system is intended for existing libraries. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 07 Jun 2010 09:30:11 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3850#comment:2 https://svn.boost.org/trac10/ticket/3850#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> I propose to close this ticket, as it is a feature request to no library. </p> Ticket