| 43 | static auto logger = getLogger("QueryMetricLog"); |
| 44 | |
| 45 | static String timePointToString(QueryMetricLog::TimePoint time) |
| 46 | { |
| 47 | /// fmtlib supports subsecond formatting in 10.0.0. We're in 9.1.0, so we need to add the milliseconds ourselves. |
| 48 | auto seconds = std::chrono::time_point_cast<std::chrono::seconds>(time); |
| 49 | auto microseconds = std::chrono::duration_cast<std::chrono::microseconds>(time - seconds).count(); |
| 50 | |
| 51 | return fmt::format("{:%Y.%m.%d %H:%M:%S}.{:06}", seconds, microseconds); |
| 52 | } |
| 53 | |
| 54 | ColumnsDescription QueryMetricLogElement::getColumnsDescription() |
| 55 | { |
no test coverage detected