C++ Reference: class TimeDistribution

This documentation is automatically generated.

Statistic on the distribution of a sequence of running times. Also provides some facility to measure such time with the CPU cycle counter.

TODO(user): Since we inherit from DistributionStat, we currently store the sum of CPU cycles as a double internally. A better option is to use int64 because with the 53 bits of precision of a double, we will run into an issue if the sum of times reaches 52 days for a 2GHz processor.

Return type: void

Arguments: double cycles

Adds a time in CPU cycles to this distribution.


Return type: void

Arguments: double seconds

Adds a time in seconds to this distribution.


Return type: static double

Arguments: double num_cycles

Internaly the TimeDistribution stores CPU cycles (to do a bit less work on each StopTimerAndAddElapsedTime()). Use this function to convert all the statistics of DistributionStat into seconds.


Return type: int

Time distributions have a high priority to be displayed first.


Return type: inline void

Starts the timer in preparation of a StopTimerAndAddElapsedTime().


Return type: inline double

Adds the elapsed time since the last StartTimer() to the distribution and returns this time in CPU cycles.


Return type: explicit

Arguments: const std::string& name


Arguments: const std::string& name, StatsGroup* group


Return type: std::string

Send feedback about...