mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
36 lines
790 B
C++
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;
|
|
};
|
|
|
|
}
|