Merge pull request #30661 from azat/QueryProfilerRuns

Add QueryProfilerRuns profile event
This commit is contained in:
alexey-milovidov 2021-10-26 09:43:51 +03:00 committed by GitHub
commit d0bf4b4303
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -227,7 +227,8 @@
M(CreatedHTTPConnections, "Total amount of created HTTP connections (counter increase every time connection is created).") \
\
M(CannotWriteToWriteBufferDiscard, "Number of stack traces dropped by query profiler or signal handler because pipe is full or cannot write to pipe.") \
M(QueryProfilerSignalOverruns, "Number of times we drop processing of a signal due to overrun plus the number of signals that OS has not delivered due to overrun.") \
M(QueryProfilerSignalOverruns, "Number of times we drop processing of a query profiler signal due to overrun plus the number of signals that OS has not delivered due to overrun.") \
M(QueryProfilerRuns, "Number of times QueryProfiler had been run.") \
\
M(CreatedLogEntryForMerge, "Successfully created log entry to merge parts in ReplicatedMergeTree.") \
M(NotCreatedLogEntryForMerge, "Log entry to merge parts in ReplicatedMergeTree is not created due to concurrent log update by another replica.") \

View File

@ -15,6 +15,7 @@
namespace ProfileEvents
{
extern const Event QueryProfilerSignalOverruns;
extern const Event QueryProfilerRuns;
}
namespace DB
@ -60,6 +61,7 @@ namespace
const StackTrace stack_trace(signal_context);
TraceCollector::collect(trace_type, stack_trace, 0);
ProfileEvents::increment(ProfileEvents::QueryProfilerRuns);
errno = saved_errno;
}