mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 13:11:32 +00:00
pt-mysql-summary: Make sure the Status Counters don't use scientific notation
This commit is contained in:
@@ -1171,8 +1171,7 @@ format_status_variables () {
|
||||
utime2 = ${utime2};
|
||||
udays = utime1 / 86400;
|
||||
udiff = utime2 - utime1;
|
||||
format=\"%-35s %11s %11s %11s\\n\";
|
||||
printf(format, \"Variable\", \"Per day\", \"Per second\", udiff \" secs\");
|
||||
printf(\"%-35s %11s %11s %11s\\n\", \"Variable\", \"Per day\", \"Per second\", udiff \" secs\");
|
||||
}
|
||||
\$2 ~ /^[0-9]*\$/ {
|
||||
if ( \$2 > 0 && \$2 < 18446744073709551615 ) {
|
||||
@@ -1195,9 +1194,13 @@ format_status_variables () {
|
||||
persec = int(persec);
|
||||
nowsec = int(nowsec);
|
||||
if ( perday + persec + nowsec > 0 ) {
|
||||
if ( perday == 0 ) { perday = \"\"; }
|
||||
if ( persec == 0 ) { persec = \"\"; }
|
||||
if ( nowsec == 0 ) { nowsec = \"\"; }
|
||||
perday_format=\"%11.f\";
|
||||
persec_format=\"%11.f\";
|
||||
nowsec_format=\"%11.f\";
|
||||
if ( perday == 0 ) { perday = \"\"; perday_format=\"%11s\"; }
|
||||
if ( persec == 0 ) { persec = \"\"; persec_format=\"%11s\"; }
|
||||
if ( nowsec == 0 ) { nowsec = \"\"; nowsec_format=\"%11s\"; }
|
||||
format=\"%-35s \" perday_format \" \" persec_format \" \" nowsec_format \"\\n\";
|
||||
printf(format, \$1, perday, persec, nowsec);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user