ClickHouse/src/Interpreters/TraceLog.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.1 KiB
C++
Raw Normal View History

2019-02-03 21:30:45 +00:00
#pragma once
#include <DataTypes/DataTypeEnum.h>
2020-01-16 12:37:29 +00:00
#include <DataTypes/DataTypesNumber.h>
2019-02-03 21:30:45 +00:00
#include <Interpreters/SystemLog.h>
#include <Interpreters/TraceCollector.h>
2020-01-16 12:37:29 +00:00
#include <Common/QueryProfiler.h>
#include <Core/NamesAndTypes.h>
#include <Core/NamesAndAliases.h>
2020-07-09 04:15:45 +00:00
2019-02-03 21:30:45 +00:00
namespace DB
{
2020-07-09 04:15:45 +00:00
/** Information from sampling profilers.
*/
2019-02-03 21:30:45 +00:00
struct TraceLogElement
{
using TraceDataType = DataTypeEnum8;
static const TraceDataType::Values trace_values;
2019-02-03 21:30:45 +00:00
time_t event_time{};
2020-11-03 15:19:24 +00:00
Decimal64 event_time_microseconds{};
UInt64 timestamp_ns{};
TraceType trace_type{};
UInt64 thread_id{};
String query_id{};
Array trace{};
2020-04-30 13:25:17 +00:00
Int64 size{}; /// Allocation size in bytes for TraceType::Memory
2020-01-16 12:37:29 +00:00
2019-02-03 21:30:45 +00:00
static std::string name() { return "TraceLog"; }
static NamesAndTypesList getNamesAndTypes();
static NamesAndAliases getNamesAndAliases() { return {}; }
void appendToBlock(MutableColumns & columns) const;
static const char * getCustomColumnList() { return nullptr; }
2019-02-03 21:30:45 +00:00
};
class TraceLog : public SystemLog<TraceLogElement>
{
using SystemLog<TraceLogElement>::SystemLog;
};
}