mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(QENG-1873) Fix Average Duration Calculation
Use the mean helper function to calculate average clone duration.
This commit is contained in:
parent
85ac329894
commit
90d6ac2f1b
1 changed files with 1 additions and 1 deletions
|
|
@ -296,7 +296,7 @@ module Vmpooler
|
|||
# if clone_total > 0, calculate clone_average.
|
||||
# this prevents divide by 0 problems.
|
||||
if me[:clone][:count][:total] > 0
|
||||
me[:clone][:duration][:average] = clone_time / me[:clone][:duration][:total]
|
||||
me[:clone][:duration][:average] = mean(clone_times)
|
||||
else
|
||||
me[:clone][:duration][:average] = 0
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue