| 54 | } |
| 55 | |
| 56 | void Profiler::stop(int32_t iteration) |
| 57 | { |
| 58 | for (auto instrument = _instruments.rbegin(); instrument != _instruments.rend(); instrument++) |
| 59 | { |
| 60 | (*instrument)->stop(); |
| 61 | } |
| 62 | for (const auto &instrument : _instruments) |
| 63 | { |
| 64 | for (const auto &measurement : instrument->measurements()) |
| 65 | { |
| 66 | if (iteration < |
| 67 | 0) // do not append "Iteration-X" prefix, we do not wish to print the figures for the invidivual iterations |
| 68 | { |
| 69 | _measurements[instrument->id() + "/" + measurement.first].push_back(measurement.second); |
| 70 | } |
| 71 | else |
| 72 | { |
| 73 | _measurements["Iteration-" + std::to_string(iteration) + " " + instrument->id() + "/" + |
| 74 | measurement.first] |
| 75 | .push_back(measurement.second); |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | void Profiler::test_stop() |
| 82 | { |
no test coverage detected