common::FlatProfiler< KeyT, KeyTraits > Class Template Reference
[Profile module]

Class to measure duration of some code in a flat manner, without any hierarchy. More...

#include <Profiler.hpp>

List of all members.

Classes

struct  ENTRY

Public Member Functions

 FlatProfiler ()
void Clear ()
 Clears all the remembered results.
void AddSample (const KeyT &key, GameTime timeInterval)
 Registers new sample collected by custom time measurement.
void FormatString (tstring *out, PROFILER_UNITS units)
 Returns multiline string with all results in unsorted order.

Detailed Description

template<typename KeyT, typename KeyTraits = std::less<KeyT>>
class common::FlatProfiler< KeyT, KeyTraits >

Class to measure duration of some code in a flat manner, without any hierarchy.

Samples are aggregated by key and for each key average time is calculated.
KeyT and KeyTraits are like in std::set or std::map. KeyT must be comparable using KeyTraits functor. KeyT must also be convertable to string with SthToStr<KeyT> function call.
Class is thread-safe.


Constructor & Destructor Documentation

template<typename KeyT, typename KeyTraits = std::less<KeyT>>
common::FlatProfiler< KeyT, KeyTraits >::FlatProfiler (  )  [inline]

The documentation for this class was generated from the following file:

Generated on Wed Dec 16 20:44:55 2009 for CommonLib by  doxygen 1.6.1