diff --git a/src/Common/QueryProfiler.cpp b/src/Common/QueryProfiler.cpp index bd1cab42be3..17af6eeed22 100644 --- a/src/Common/QueryProfiler.cpp +++ b/src/Common/QueryProfiler.cpp @@ -173,7 +173,7 @@ void QueryProfilerBase::tryCleanup() } template class QueryProfilerBase; -template class QueryProfilerBase; +template class QueryProfilerBase; QueryProfilerReal::QueryProfilerReal(const UInt64 thread_id, const UInt32 period) : QueryProfilerBase(thread_id, CLOCK_MONOTONIC, period, SIGUSR1) @@ -185,11 +185,11 @@ void QueryProfilerReal::signalHandler(int sig, siginfo_t * info, void * context) writeTraceInfo(TraceType::Real, sig, info, context); } -QueryProfilerCpu::QueryProfilerCpu(const UInt64 thread_id, const UInt32 period) +QueryProfilerCPU::QueryProfilerCPU(const UInt64 thread_id, const UInt32 period) : QueryProfilerBase(thread_id, CLOCK_THREAD_CPUTIME_ID, period, SIGUSR2) {} -void QueryProfilerCpu::signalHandler(int sig, siginfo_t * info, void * context) +void QueryProfilerCPU::signalHandler(int sig, siginfo_t * info, void * context) { DENY_ALLOCATIONS_IN_SCOPE; writeTraceInfo(TraceType::CPU, sig, info, context); diff --git a/src/Common/QueryProfiler.h b/src/Common/QueryProfiler.h index 8e2d09e0be2..e5a1662e2d4 100644 --- a/src/Common/QueryProfiler.h +++ b/src/Common/QueryProfiler.h @@ -26,7 +26,7 @@ namespace DB * 3. write collected stack trace to trace_pipe for TraceCollector * * Destructor tries to unset timer and restore previous signal handler. - * Note that signal handler implementation is defined by template parameter. See QueryProfilerReal and QueryProfilerCpu. + * Note that signal handler implementation is defined by template parameter. See QueryProfilerReal and QueryProfilerCPU. */ template class QueryProfilerBase @@ -62,10 +62,10 @@ public: }; /// Query profiler with timer based on CPU clock -class QueryProfilerCpu : public QueryProfilerBase +class QueryProfilerCPU : public QueryProfilerBase { public: - QueryProfilerCpu(const UInt64 thread_id, const UInt32 period); + QueryProfilerCPU(const UInt64 thread_id, const UInt32 period); static void signalHandler(int sig, siginfo_t * info, void * context); }; diff --git a/src/Common/ThreadStatus.h b/src/Common/ThreadStatus.h index dbfb33a320c..6a2abeeef76 100644 --- a/src/Common/ThreadStatus.h +++ b/src/Common/ThreadStatus.h @@ -29,7 +29,7 @@ namespace DB class QueryStatus; class ThreadStatus; class QueryProfilerReal; -class QueryProfilerCpu; +class QueryProfilerCPU; class QueryThreadLog; struct OpenTelemetrySpanHolder; class TasksStatsCounters; @@ -140,7 +140,7 @@ protected: // CPU and Real time query profilers std::unique_ptr query_profiler_real; - std::unique_ptr query_profiler_cpu; + std::unique_ptr query_profiler_cpu; Poco::Logger * log = nullptr; diff --git a/src/Interpreters/ThreadStatusExt.cpp b/src/Interpreters/ThreadStatusExt.cpp index 2917a399906..52f9c6b6fbf 100644 --- a/src/Interpreters/ThreadStatusExt.cpp +++ b/src/Interpreters/ThreadStatusExt.cpp @@ -328,7 +328,7 @@ void ThreadStatus::initQueryProfiler() /* period */ static_cast(settings.query_profiler_real_time_period_ns)); if (settings.query_profiler_cpu_time_period_ns > 0) - query_profiler_cpu = std::make_unique(thread_id, + query_profiler_cpu = std::make_unique(thread_id, /* period */ static_cast(settings.query_profiler_cpu_time_period_ns)); } catch (...)