Helper classes to time a block of code and add the result to a TimeDistribution. Calls StartTimer() on creation and StopTimerAndAddElapsedTime() on destruction.
There are three classes with the same interface:
- EnabledScopedTimeDistributionUpdater always collects the time stats of the scope in which it is defined. This class is used for stats that are always collected.
- ScopedTimeDistributionUpdater collects the time stats only when OR_STATS is defined. This symbol should be used for collecting stats in places where the overhead of collecting the stats may hurt the performance of the algorithm.
- DisabledScopedTimeDistributionUpdater is used to implement ScopedTimeDistributionUpdater when OR_STATS is not defined.
Definition at line 313 of file stats.h.