2019-02-03 21:30:45 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-03-04 13:03:32 +00:00
|
|
|
#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
|
|
|
|
{
|
2019-03-04 13:03:32 +00:00
|
|
|
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{};
|
2019-07-24 20:10:23 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|