mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-02 10:36:28 +00:00
Update pt-diskstats to keep in sync with the previous commit.
This commit is contained in:
@@ -2192,9 +2192,17 @@ sub _calc_misc_stats {
|
||||
+ $delta_for->{ms_spent_writing};
|
||||
|
||||
if ( $number_of_ios ) {
|
||||
$extra_stats{qtime} =
|
||||
$delta_for->{ms_weighted} / ($number_of_ios + $delta_for->{ios_in_progress})
|
||||
- $delta_for->{ms_spent_doing_io} / $number_of_ios;
|
||||
my $average_ios = $number_of_ios + $delta_for->{ios_in_progress};
|
||||
if ( $average_ios ) {
|
||||
$extra_stats{qtime} = $delta_for->{ms_weighted} / $average_ios
|
||||
- $delta_for->{ms_spent_doing_io} / $number_of_ios;
|
||||
}
|
||||
else {
|
||||
PTDEBUG && _d("IOS_IN_PROGRESS is [$delta_for->{ios_in_progress}], ",
|
||||
"and the number of ios is [$number_of_ios], going to ",
|
||||
"use 0 as qtime.");
|
||||
$extra_stats{qtime} = 0;
|
||||
}
|
||||
$extra_stats{stime}
|
||||
= $delta_for->{ms_spent_doing_io} / $number_of_ios;
|
||||
}
|
||||
|
Reference in New Issue
Block a user