mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
948ce8db93
This reverts commite99849d031
, reversing changes made to7ad3ff8a9e
.
50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <DataTypes/DataTypeEnum.h>
|
|
#include <DataTypes/DataTypesNumber.h>
|
|
#include <Interpreters/SystemLog.h>
|
|
#include <Common/QueryProfiler.h>
|
|
#include <Common/ProfileEvents.h>
|
|
#include <Common/TraceSender.h>
|
|
#include <Core/NamesAndTypes.h>
|
|
#include <Core/NamesAndAliases.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/** Information from sampling profilers.
|
|
*/
|
|
struct TraceLogElement
|
|
{
|
|
using TraceDataType = DataTypeEnum8;
|
|
static const TraceDataType::Values trace_values;
|
|
|
|
time_t event_time{};
|
|
Decimal64 event_time_microseconds{};
|
|
UInt64 timestamp_ns{};
|
|
TraceType trace_type{};
|
|
UInt64 thread_id{};
|
|
String query_id{};
|
|
Array trace{};
|
|
/// Allocation size in bytes for TraceType::Memory.
|
|
Int64 size{};
|
|
/// ProfileEvent for TraceType::ProfileEvent.
|
|
ProfileEvents::Event event{ProfileEvents::end()};
|
|
/// Increment of profile event for TraceType::ProfileEvent.
|
|
ProfileEvents::Count increment{};
|
|
|
|
static std::string name() { return "TraceLog"; }
|
|
static NamesAndTypesList getNamesAndTypes();
|
|
static NamesAndAliases getNamesAndAliases() { return {}; }
|
|
void appendToBlock(MutableColumns & columns) const;
|
|
static const char * getCustomColumnList() { return nullptr; }
|
|
};
|
|
|
|
class TraceLog : public SystemLog<TraceLogElement>
|
|
{
|
|
using SystemLog<TraceLogElement>::SystemLog;
|
|
};
|
|
|
|
}
|