#pragma once #include #include #include #include #include #include #include #include #include namespace DB { /** MetricLog is a log of metric values measured at regular time interval. */ struct MetricLogElement { time_t event_time{}; Decimal64 event_time_microseconds{}; std::vector profile_events; std::vector current_metrics; static std::string name() { return "MetricLog"; } static ColumnsDescription getColumnsDescription(); static NamesAndAliases getNamesAndAliases() { return {}; } void appendToBlock(MutableColumns & columns) const; }; class MetricLog : public PeriodicLog { using PeriodicLog::PeriodicLog; protected: void stepFunction(TimePoint current_time) override; }; }