More decorative fixes

This commit is contained in:
elevankoff 2021-05-24 17:24:29 +00:00
parent 067ec0855c
commit 6bf0840562
3 changed files with 43 additions and 41 deletions

View File

@ -140,7 +140,8 @@ void ProcessorStatisticsOS::readProcTimeAndProcesses(ProcTime & proc_time, ProcS
proc_time.guest /= USER_HZ; proc_time.guest /= USER_HZ;
proc_time.guest_nice /= USER_HZ; proc_time.guest_nice /= USER_HZ;
do { do
{
readStringUntilWhitespaceAndSkipWhitespaceIfAny(field_name, procst_in); readStringUntilWhitespaceAndSkipWhitespaceIfAny(field_name, procst_in);
readStringAndSkipWhitespaceIfAny(field_val, procst_in); readStringAndSkipWhitespaceIfAny(field_val, procst_in);
} while (field_name != String("processes")); } while (field_name != String("processes"));
@ -163,8 +164,10 @@ void ProcessorStatisticsOS::readFreq(ProcFreq & freq)
int cpu_count = 0; int cpu_count = 0;
freq.max = freq.min = freq.avg = 0; freq.max = freq.min = freq.avg = 0;
do { do
do { {
do
{
readStringAndSkipWhitespaceIfAny(field_name, cpuinfo_in); readStringAndSkipWhitespaceIfAny(field_name, cpuinfo_in);
} while (!cpuinfo_in.eof() && field_name != String("cpu MHz")); } while (!cpuinfo_in.eof() && field_name != String("cpu MHz"));

View File

@ -18,7 +18,6 @@ namespace DB
class ProcessorStatisticsOS class ProcessorStatisticsOS
{ {
public: public:
struct ProcLoadavg struct ProcLoadavg
{ {
float avg1; float avg1;