mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 01:30:51 +00:00
Enable taskstat accounting for versions >= 3
Previously if clickhouse was compiled under a kernel with higher TASKSTATS_VERSION, but run under a kernel with older TASKSTAT_VERSION extended and io accounting would be disabled.
This commit is contained in:
parent
a4e56478ca
commit
602aeb3bb2
@ -137,8 +137,8 @@ struct TasksStatsCounters
|
||||
profile_events.increment(ProfileEvents::OSCPUVirtualTimeMicroseconds,
|
||||
safeDiff(prev.stat.cpu_run_virtual_total, curr.stat.cpu_run_virtual_total) / 1000U);
|
||||
|
||||
/// Too old struct version, do not read new fields
|
||||
if (curr.stat.version < TASKSTATS_VERSION)
|
||||
/// Since TASKSTATS_VERSION = 3 extended accounting and IO accounting is available.
|
||||
if (curr.stat.version < 3)
|
||||
return;
|
||||
|
||||
profile_events.increment(ProfileEvents::OSReadChars, safeDiff(prev.stat.read_char, curr.stat.read_char));
|
||||
|
Loading…
Reference in New Issue
Block a user