| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <Common/QueryProfiler.h> |
| 4 | #include <DataTypes/DataTypesNumber.h> |
| 5 | #include <DataTypes/DataTypeEnum.h> |
| 6 | #include <Interpreters/SystemLog.h> |
| 7 | |
| 8 | namespace DB |
| 9 | { |
| 10 | |
| 11 | struct TraceLogElement |
| 12 | { |
| 13 | using TimerDataType = DataTypeEnum8; |
| 14 | static const TimerDataType::Values timer_values; |
| 15 | |
| 16 | time_t event_time{}; |
| 17 | TimerType timer_type{}; |
| 18 | UInt32 thread_number{}; |
| 19 | String query_id{}; |
| 20 | Array trace{}; |
| 21 | |
| 22 | static std::string name() { return "TraceLog"; } |
| 23 | static Block createBlock(); |
| 24 | void appendToBlock(Block & block) const; |
| 25 | }; |
| 26 | |
| 27 | class TraceLog : public SystemLog<TraceLogElement> |
| 28 | { |
| 29 | using SystemLog<TraceLogElement>::SystemLog; |
| 30 | }; |
| 31 | |
| 32 | } |
| 33 |