M(OSReadChars, "Number of bytes read from filesystem, including page cache.") \
M(OSReadChars, "Number of bytes read from filesystem, including page cache.") \
M(OSWriteChars, "Number of bytes written to filesystem, including page cache.") \
M(OSWriteChars, "Number of bytes written to filesystem, including page cache.") \
M(CreatedHTTPConnections, "Total amount of created HTTP connections (closed or opened).") \
M(CreatedHTTPConnections, "Total amount of created HTTP connections (closed or opened).") \
\
M(QueryProfilerCannotWriteTrace, "Number of stack traces dropped by query profiler 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.") \
@@ -221,8 +221,8 @@ struct Settings : public SettingsCollection<Settings>
...
@@ -221,8 +221,8 @@ struct Settings : public SettingsCollection<Settings>
M(SettingBool, empty_result_for_aggregation_by_empty_set, false, "Return empty result when aggregating without keys on empty set.") \
M(SettingBool, empty_result_for_aggregation_by_empty_set, false, "Return empty result when aggregating without keys on empty set.") \
M(SettingBool, allow_distributed_ddl, true, "If it is set to true, then a user is allowed to executed distributed DDL queries.") \
M(SettingBool, allow_distributed_ddl, true, "If it is set to true, then a user is allowed to executed distributed DDL queries.") \
M(SettingUInt64, odbc_max_field_size, 1024, "Max size of filed can be read from ODBC dictionary. Long strings are truncated.") \
M(SettingUInt64, odbc_max_field_size, 1024, "Max size of filed can be read from ODBC dictionary. Long strings are truncated.") \
M(SettingUInt64, query_profiler_real_time_period_ns, 0, "Period for real clock timer of query profiler (in nanoseconds). Set 0 value to turn off real clock query profiler") \
M(SettingUInt64, query_profiler_real_time_period_ns, 0, "Highly experimental. Period for real clock timer of query profiler (in nanoseconds). Set 0 value to turn off real clock query profiler. Recommended value is at least 10000000 (100 times a second) for single queries or 1000000000 (once a second) for cluster-wide profiling.") \
M(SettingUInt64, query_profiler_cpu_time_period_ns, 0, "Period for CPU clock timer of query profiler (in nanoseconds). Set 0 value to turn off CPU clock query profiler") \
M(SettingUInt64, query_profiler_cpu_time_period_ns, 0, "Highly experimental. Period for CPU clock timer of query profiler (in nanoseconds). Set 0 value to turn off CPU clock query profiler. Recommended value is at least 10000000 (100 times a second) for single queries or 1000000000 (once a second) for cluster-wide profiling.") \
\
\
\
\
/** Limits during query execution are part of the settings. \
/** Limits during query execution are part of the settings. \
SELECTsleep(0.5),ignore('test real time query profiler');
SETlog_queries=0;
SYSTEMFLUSHLOGS;
WITHsymbolizeAddress(arrayJoin(trace))ASsymbolSELECTcount()>0FROMsystem.trace_logtWHEREevent_date>=yesterday()ANDquery_id=(SELECTquery_idFROMsystem.query_logWHEREevent_date>=yesterday()ANDqueryLIKE'%test real time query profiler%'ORDERBYevent_timeDESCLIMIT1)ANDsymbolLIKE'%FunctionSleep%';
SETquery_profiler_real_time_period_ns=0;
SETquery_profiler_cpu_time_period_ns=100000000;
SETlog_queries=1;
SELECTcount(),ignore('test cpu time query profiler')FROMnumbers(1000000000);
SETlog_queries=0;
SYSTEMFLUSHLOGS;
WITHsymbolizeAddress(arrayJoin(trace))ASsymbolSELECTcount()>0FROMsystem.trace_logtWHEREevent_date>=yesterday()ANDquery_id=(SELECTquery_idFROMsystem.query_logWHEREevent_date>=yesterday()ANDqueryLIKE'%test cpu time query profiler%'ORDERBYevent_timeDESCLIMIT1)ANDsymbolLIKE'%Numbers%';