-----------------------------------------------------------------------------
| 51 | } |
| 52 | //----------------------------------------------------------------------------- |
| 53 | Table TimeLogger::timing_table() const |
| 54 | { |
| 55 | // Generate log::timing table |
| 56 | Table table("Summary of timings (s)"); |
| 57 | for (auto& it : _timings) |
| 58 | { |
| 59 | std::string task = it.first; |
| 60 | auto [num_timings, time] = it.second; |
| 61 | table.set(task, "reps", num_timings); |
| 62 | table.set(task, "avg", time.count() / static_cast<double>(num_timings)); |
| 63 | table.set(task, "tot", time.count()); |
| 64 | } |
| 65 | |
| 66 | return table; |
| 67 | } |
| 68 | //----------------------------------------------------------------------------- |
| 69 | std::pair<int, std::chrono::duration<double, std::ratio<1>>> |
| 70 | TimeLogger::timing(const std::string& task) const |