#pragma once #include #include #include #include #include #include #include #include #include namespace DB { /** Information from sampling profilers. */ struct TraceLogElement { using TraceDataType = DataTypeEnum8; static const TraceDataType::Values trace_values; time_t event_time{}; Decimal64 event_time_microseconds{}; UInt64 timestamp_ns{}; TraceType trace_type{}; UInt64 thread_id{}; String query_id{}; Array trace{}; /// Allocation size in bytes for TraceType::Memory and TraceType::MemorySample. Int64 size{}; /// Allocation ptr for TraceType::MemorySample. UInt64 ptr{}; /// ProfileEvent for TraceType::ProfileEvent. ProfileEvents::Event event{ProfileEvents::end()}; /// Increment of profile event for TraceType::ProfileEvent. ProfileEvents::Count increment{}; static std::string name() { return "TraceLog"; } static ColumnsDescription getColumnsDescription(); static NamesAndAliases getNamesAndAliases() { return {}; } void appendToBlock(MutableColumns & columns) const; }; class TraceLog : public SystemLog { using SystemLog::SystemLog; }; }