The Statistics
Class Reference
Declaration
class Statistics { ... }
Public Constructors Index
Statistics () | |
Public Member Functions Index
void | begin (const char *name) |
void | end () |
void | print () |
Private Member Attributes Index
std::vector< stat > | stats |
std::chrono::steady_clock::time_point | startTime |
Definition at line 228 of file doxygen.cpp.
Public Constructors
Statistics()
| inline |
Definition at line 231 of file doxygen.cpp.
231 Statistics() {}
Public Member Functions
begin()
| inline |
end()
| inline |
Definition at line 238 of file doxygen.cpp.
239 {
240 std::chrono::steady_clock::time_point endTime = std::chrono::steady_clock::now();
241 stats.back().elapsed = static_cast<double>(std::chrono::duration_cast<
242 std::chrono::microseconds>(endTime - startTime).count())/1000000.0;
243 warn_flush();
244 }
References startTime, stats and warn_flush.
print()
| inline |
Definition at line 245 of file doxygen.cpp.
246 {
247 bool restore=FALSE;
248 if (Debug::isFlagSet(Debug::Time))
249 {
250 Debug::clearFlag(Debug::Time);
251 restore=TRUE;
252 }
253 msg("----------------------\n");
254 for (const auto &s : stats)
255 {
256 msg("Spent {:.6f} seconds in {}",s.elapsed,s.name);
257 }
258 if (restore) Debug::setFlag(Debug::Time);
259 }
References Debug::clearFlag, FALSE, Debug::isFlagSet, msg, Debug::setFlag, stats, Debug::Time and TRUE.
Private Member Attributes
startTime
|
Definition at line 269 of file doxygen.cpp.
stats
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus by Doxygen 1.14.0.