Perf dashboard should avoid overflow during geometric mean computation
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Dec 2015 22:09:16 +0000 (22:09 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Dec 2015 22:09:16 +0000 (22:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=151773

Reviewed by Chris Dumez.

* public/include/report-processor.php:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192965 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/include/report-processor.php

index 9e3568d..bbf5bef 100644 (file)
@@ -1,3 +1,12 @@
+2015-12-02  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Perf dashboard should avoid overflow during geometric mean computation
+        https://bugs.webkit.org/show_bug.cgi?id=151773
+
+        Reviewed by Chris Dumez.
+
+        * public/include/report-processor.php:
+
 2015-11-30  Ryosuke Niwa  <rniwa@webkit.org>
 
         Perf dashboard should extend baseline and target to the future
index cf6aea8..a623be5 100644 (file)
@@ -360,7 +360,7 @@ class TestRunsGenerator {
         case 'Arithmetic':
             return array_sum($values) / count($values);
         case 'Geometric':
-            return pow(array_product($values), 1 / count($values));
+            return exp(array_sum(array_map(log, $values)) / count($values));
         case 'Harmonic':
             return count($values) / array_sum(array_map(function ($x) { return 1 / $x; }, $values));
         case 'Total':