dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0613928
)
benchmarks: Fix divide by zero in Benchmarker
author
Brad Jorsch
<bjorsch@wikimedia.org>
Thu, 1 Feb 2018 21:26:09 +0000
(16:26 -0500)
committer
Krinkle
<krinklemail@gmail.com>
Fri, 2 Feb 2018 02:24:49 +0000
(
02:24
+0000)
Follows-up
593442683dc471c0
.
Bug: T186269
Change-Id: I011a8614e0acf489daf5bd9dcb932e920b995092
maintenance/benchmarks/Benchmarker.php
patch
|
blob
|
history
diff --git
a/maintenance/benchmarks/Benchmarker.php
b/maintenance/benchmarks/Benchmarker.php
index
f1e7dbb
..
e1eef07
100644
(file)
--- a/
maintenance/benchmarks/Benchmarker.php
+++ b/
maintenance/benchmarks/Benchmarker.php
@@
-100,7
+100,7
@@
abstract class Benchmarker extends Maintenance {
'name' => $name,
'count' => $stat->getCount(),
// Get rate per second from mean (in ms)
- 'rate' =>
1.0 / ( $stat->getMean() / 1000.0
),
+ 'rate' =>
$stat->getMean() == 0 ? INF : ( 1.0 / ( $stat->getMean() / 1000.0 )
),
'total' => $stat->getMean() * $stat->getCount(),
'mean' => $stat->getMean(),
'max' => $stat->max,