Boost logo

Boost :

From: christopher diggins (cdiggins_at_[hidden])
Date: 2005-02-14 15:08:29

Preston brought up a good point earlier about the complexity of having the
profile_manager being entirely static. What if instead we created
profile_manager variables and passed them to the profiler (if desired)
something like:

profile_manager pm1("profile-group-1", &cerr /* log to cerr */, false /*
don't collect stats */, ...);
profile_manager pm2("profile-group-2", null /* don't log */, true /* do
collect stats */, ...) ;

{ profiler p("profileA", pm1); ... }
{ profiler p("profileB", pm1); ... }
{ profiler p("profileC", pm2); ... }
{ profiler p("profileD", pm2); ... }


The profiler would still recieve a profiler_manager type as a type

typedef basic_profiler<profile_manager> profiler;

And the profile_manager would also still have its type parameters:

typedef basic_profile_manager<string, high_resolution_timer,
default_stats_policy, default_logging_policy> profile_manager;

Any comments or suggestions?

Christopher Diggins
Object Oriented Template Library (OOTL)

Boost list run by bdawes at, gregod at, cpdaniel at, john at