qi::stats namespace¶
Summary¶
class qi::MethodStatistics
class qi::MinMaxSum
Global Classes
Reference¶
qi::MinMaxSum Class Reference¶
Public Functions¶
Detailed Description¶
Stores min, max and sum of values fed to it.
Function Documentation¶
-
qi::MinMaxSum::
MinMaxSum
()¶ Default constructor.
-
qi::MinMaxSum::
MinMaxSum
(float minValue, float maxValue, float cumulatedValue)¶ Brief: Constructor.
Parameters: - minValue – Minimum value.
- maxValue – Maximum value.
- cumulatedValue – Sum of all value add to the class.
-
const float&
qi::MinMaxSum::
minValue
()const
¶ Get minimum value.
-
const float&
qi::MinMaxSum::
maxValue
()const
¶ Get maximum value.
-
const float&
qi::MinMaxSum::
cumulatedValue
()const
¶ Get sum of all value push value.
-
void
qi::MinMaxSum::
push
(float val, bool init = false)¶ Brief: Push a new value, process new min/max and add the value to cumulated.
Parameters: - val – New value.
- init – If true init min, max, cumulated to val
-
std::string
qi::MinMaxSum::
asString
(unsigned int count)const
¶ Brief: asString Get a string from min, max and cumulated.
Parameters: - count – Devide cumulated by count.
Returns: A string with format (cumulated / count), min and max In this order separated by space.
qi::MethodStatistics Class Reference¶
Public Functions¶
-
()MethodStatistics
-
(unsigned int count, MinMaxSum wall, MinMaxSum user, MinMaxSum system)MethodStatistics
-
void
(float wall, float user, float system)push
-
const MinMaxSum&
() constwall
-
const MinMaxSum&
() constuser
-
const MinMaxSum&
() constsystem
-
unsigned int&
() constcount
-
void
()reset
Detailed Description¶
Store statistics about method calls.
Function Documentation¶
-
qi::MethodStatistics::
MethodStatistics
()¶ Constructor.
-
qi::MethodStatistics::
MethodStatistics
(unsigned int count, MinMaxSum wall, MinMaxSum user, MinMaxSum system)¶ Brief: Constructor and Set.
Parameters: - count – Number of value added.
- wall – Wall statistics.
- user – User statistics.
- system – System statistics.
-
void
qi::MethodStatistics::
push
(float wall, float user, float system)¶ Brief: Add value for all tree statistics values.
Parameters: - wall – Value to add to wall statistics.
- user – Value to add to user statistics.
- system – Value to add to system statistics.
If it’s the fist time that push is call, min, max and cumulated will be set to the value added.
-
const MinMaxSum&
qi::MethodStatistics::
wall
()const
¶ Brief: Get wall MinMaxSum value.
Returns: Return MinMaxSum value.
-
const MinMaxSum&
qi::MethodStatistics::
user
()const
¶ Brief: Get user MinMaxSum value.
Returns: Return MinMaxSum value.
-
const MinMaxSum&
qi::MethodStatistics::
system
()const
¶ Brief: Get system MinMaxSum value.
Returns: Return MinMaxSum value.
-
unsigned int&
qi::MethodStatistics::
count
()const
¶ Brief: Get number of value added.
Returns: Return number of value pushed.