|
Boost : |
From: christopher diggins (cdiggins_at_[hidden])
Date: 2005-02-08 15:06:51
----- Original Message -----
From: "Bob Bell" <belvis_at_[hidden]>
[snip]
> A final data point is an answer to your original question "Would you use
> it?"
> Not without being able to pause and resume the profiler. I also wouldn't
> be
> interested in it as long as the reporting and collection concepts are
> confused.
>
> Bob
Thanks for your comments,
Okay, so the general consensus has been quite consistent:
- ability to turn off globally
- pause and resume
- As unintrusive as possible (no requirement of code reporting)
- hierarchical reporting (optional)
I think perhaps the best approach then would be a macro library. I propose
the following macros:
BOOST_PROFILING_OFF // turns off the macros
BOOST_PROFILE_START(profiler_type, name)
BOOST_PROFILE_STOP(name)
BOOST_PROFILE_PAUSE(name)
BOOST_PROFILE_RESUME(name)
BOOST_PROFILE_EXPR(expression)
BOOST_PROFILE_REPORT(name)
BOOST_PROFILE_ALL(name)
I then will follow Gennadiy's suggestion of multiple policies:
basic_profiler<reporting_policy, logging_policy, collecting_policy,
timer_policy>
How does this sound? My apologies to Gennadiy for having been hard-headed.
Christopher Diggins
Object Oriented Template Library (OOTL)
http://www.ootl.org
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk