helper for printing the struct at the end of the lifetime of the program
More...
helper for printing the struct at the end of the lifetime of the program
Definition at line 69 of file tictoc.cpp.
g2o::TicTocInitializer::TicTocInitializer |
( |
| ) |
|
|
inline |
g2o::TicTocInitializer::~TicTocInitializer |
( |
| ) |
|
|
inline |
Definition at line 77 of file tictoc.cpp.
86 std::vector<TicTocElement> sortedElements;
89 if (it->second.numCalls == 0)
91 longestName = std::max(longestName, (
int)it->first.size());
92 sortedElements.push_back(it->second);
94 std::sort(sortedElements.begin(), sortedElements.end());
99 printf(
"------------------------------------------\n");
100 printf(
"| TICTOC STATISTICS |\n");
101 printf(
"------------------------------------------\n");
102 for(std::vector<TicTocElement>::const_iterator it = sortedElements.begin(); it != sortedElements.end(); ++it) {
103 double avgTime = it->totalTime / it->numCalls;
104 printf(
"%s", it->algorithmPart.c_str());
105 for (
int i = it->algorithmPart.size(); i < longestName; ++i)
107 printf(
"numCalls= %d\t total= %.4f\t avg= %.4f\t min= %.4f\t max= %.4f\t ema= %.4f\n",
108 it->numCalls, it->totalTime, avgTime, it->minTime, it->maxTime, it->exponentialMovingAverage);
110 printf(
"------------------------------------------\n");
bool g2o::TicTocInitializer::enabled |
TicTocMap g2o::TicTocInitializer::tictocElements |
The documentation for this struct was generated from the following file:
- /home/xuezhisd/CLionProjects/g2o/g2o/stuff/tictoc.cpp