Dromaeo perf-tests results are wrong
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2012 14:09:46 +0000 (14:09 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2012 14:09:46 +0000 (14:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80974

Reviewed by Hajime Morita.

Dromaeo perf-tests had reported the sum of runs/seconds as "ms".
This patch fixes them to report the execution time per run.

At present, they report "0.0ms" for "stdev". This is because
dromaeorunner.js can just know stdev of "runs/seconds"
and cannot calculate stdev of "ms" from that. We can fix it later.

* Dromaeo/resources/dromaeorunner.js:
(.):

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

PerformanceTests/ChangeLog
PerformanceTests/Dromaeo/resources/dromaeorunner.js

index e1b6993..75f0144 100644 (file)
@@ -1,3 +1,20 @@
+2012-03-13  Kentaro Hara  <haraken@chromium.org>
+
+        Dromaeo perf-tests results are wrong
+        https://bugs.webkit.org/show_bug.cgi?id=80974
+
+        Reviewed by Hajime Morita.
+
+        Dromaeo perf-tests had reported the sum of runs/seconds as "ms".
+        This patch fixes them to report the execution time per run.
+
+        At present, they report "0.0ms" for "stdev". This is because
+        dromaeorunner.js can just know stdev of "runs/seconds"
+        and cannot calculate stdev of "ms" from that. We can fix it later.
+
+        * Dromaeo/resources/dromaeorunner.js:
+        (.):
+
 2012-03-12  Ilya Tikhonovsky  <loislo@chromium.org>
 
         Web Inspector: chromium: increase heap snapshot performance coverage.
index 136093e..47c7f28 100644 (file)
@@ -3,22 +3,25 @@
          baseURL: "./resources/dromaeo/web/index.html",
 
          computeScores: function (results) {
-             var mean = 0, min = 0, max = 0, stdev = 0, varsum = 0;
+             var mean = 0, min = 0, max = 0, median = 0;
 
              for (var i = 0; i < results.length; ++i) {
                  var item = results[i];
-                 mean += item.mean;
-                 min += item.min;
-                 max += item.max;
-                 varsum += item.deviation * item.deviation;
+                 if (item.mean == 0 || item.max == 0 || item.min == 0 || item.median == 0)
+                     return {median: 0, mean: 0, min: 0, max: 0, stdev: 0};
+
+                 mean += 1000 / item.mean;
+                 min += 1000 / item.max;
+                 max += 1000 / item.min;
+                 median += 1000 / item.median;
              }
 
              return {
-                 median: 0,
+                 median: median,
                  mean: mean,
                  min: min,
                  max: max,
-                 stdev: Math.sqrt(varsum)
+                 stdev: 0
              };
          },