ClickHouse/dbms/src/Interpreters/TraceLog.h

33 lines
662 B
C++
Raw Normal View History

2019-02-03 21:30:45 +00:00
#pragma once
#include <Common/QueryProfiler.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeEnum.h>
2019-02-03 21:30:45 +00:00
#include <Interpreters/SystemLog.h>
namespace DB
{
struct TraceLogElement
{
using TimerDataType = DataTypeEnum8;
static const TimerDataType::Values timer_values;
2019-02-03 21:30:45 +00:00
time_t event_time{};
2019-07-23 20:07:33 +00:00
TimerType timer_type{};
UInt32 thread_number{};
2019-02-03 21:30:45 +00:00
String query_id{};
2019-07-05 13:48:47 +00:00
Array trace{};
2019-02-03 21:30:45 +00:00
static std::string name() { return "TraceLog"; }
static Block createBlock();
void appendToBlock(Block & block) const;
};
class TraceLog : public SystemLog<TraceLogElement>
{
using SystemLog<TraceLogElement>::SystemLog;
};
}