8#ifndef META_OCEAN_BASE_HIGH_PERFORMANCE_TIMER_H
9#define META_OCEAN_BASE_HIGH_PERFORMANCE_TIMER_H
108#ifdef OCEAN_USE_EXTERNAL_PRIVACY_CONFIRM_TICKS
187 inline double first()
const;
199 inline double second()
const;
211 inline double best()
const;
223 inline double worst()
const;
235 inline double last()
const;
293 inline double total()
const;
370 std::string
toString(
const unsigned int precision = 2u)
const;
376 explicit inline operator bool()
const;
564 bool reportAsTokenMatrix(std::vector<std::vector<Value>>& tokenMatrix,
const double referenceSeconds = 0.0,
const unsigned numberIndentationSpace = 0u,
const std::string& categoryNameDelimiter =
"::",
const bool addColumnDescriptions =
false,
const bool valuesAsStrings =
true,
const bool includeSubCategories =
true)
const;
632 inline void change(std::string name);
861 return best_ * 1000.0;
911 ocean_assert(operations > 0.0 && clockRate > 0.0);
913 const double seconds =
average();
919 const double operationsPerSecond = operations / seconds;
920 ocean_assert(operationsPerSecond > 0.0);
922 const double cyclesPerOperation = clockRate / operationsPerSecond;
924 return cyclesPerOperation;
934 return total() * 1000.0;
957inline HighPerformanceStatistic::operator bool()
const
965 stream << highPerformanceStatistic.
toString();
970template <
bool tActive>
973 messageObject << highPerformanceStatistic.toString();
975 return messageObject;
978template <
bool tActive>
981 messageObject << highPerformanceStatistic.toString();
983 return messageObject;
987 name_(std::move(name)),
1030 name_ = std::move(name);
This class implements a recursive lock object.
Definition Lock.h:31
static HighPerformanceBenchmark & get()
Definition Singleton.h:115
std::vector< std::string > Strings
Definition of a vector holding strings.
Definition Base.h:162
The namespace covering the entire Ocean framework.
Definition Accessor.h:15
std::ostream & operator<<(std::ostream &stream, const HighPerformanceStatistic &highPerformanceStatistic)
Definition HighPerformanceTimer.h:963
uint64_t HighPerformanceTimer_externalPrivacyConfirmTicks()
Returns the recent CPU ticks which will contain a random offset which is constant through the executi...