diff --git a/dbms/src/Common/QueryProfiler.cpp b/dbms/src/Common/QueryProfiler.cpp index 4bf5009d51c..ac2987a3795 100644 --- a/dbms/src/Common/QueryProfiler.cpp +++ b/dbms/src/Common/QueryProfiler.cpp @@ -40,7 +40,7 @@ namespace if (overrun_count) { /// But pass with some frequency to avoid drop of all traces. - if (write_trace_iteration % overrun_count == 0) + if (write_trace_iteration % (overrun_count + 1) == 0) { ProfileEvents::increment(ProfileEvents::QueryProfilerSignalOverruns, overrun_count); }