ClickHouse/dbms/Interpreters/TraceLog.h
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

36 lines
790 B
C++

#pragma once
#include <DataTypes/DataTypeEnum.h>
#include <DataTypes/DataTypesNumber.h>
#include <Interpreters/SystemLog.h>
#include <Common/QueryProfiler.h>
#include <Common/TraceCollector.h>
namespace DB
{
struct TraceLogElement
{
using TraceDataType = DataTypeEnum8;
static const TraceDataType::Values trace_values;
time_t event_time{};
UInt64 timestamp_ns{};
TraceType trace_type{};
UInt64 thread_id{};
String query_id{};
Array trace{};
UInt64 size{}; /// Allocation size in bytes for TraceType::Memory
static std::string name() { return "TraceLog"; }
static Block createBlock();
void appendToBlock(Block & block) const;
};
class TraceLog : public SystemLog<TraceLogElement>
{
using SystemLog<TraceLogElement>::SystemLog;
};
}