- Revision
- 110933
- Author
- [email protected]
- Date
- 2012-03-15 20:13:28 -0700 (Thu, 15 Mar 2012)
Log Message
[PerformanceTests] run-perf-tests should output correct units
https://bugs.webkit.org/show_bug.cgi?id=78303
Reviewed by Ryosuke Niwa.
Previously run-perf-tests just supported "ms" for units.
Consequently, Dromaeo perf tests had been reporting runs/s as "ms".
This patch fixes run-perf-tests so that they can support custom units.
The default unit is "ms".
The test result looks like this:
$ ./Tools/Scripts/run-perf-tests Dromaeo/dom-attr.html
RESULT Dromaeo: dom-attr= 6465.9525483 runs/s
median= 0.0 runs/s, stdev= 24.2983433436 runs/s, min= 6435.87649402 runs/s, max= 6515.63693392 runs/s
PerformanceTests:
* Dromaeo/resources/dromaeorunner.js:
(.):
* resources/runner.js:
(PerfTestRunner.computeStatistics):
(PerfTestRunner.printStatistics):
Tools:
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._process_parser_test_result):
Modified Paths
Diff
Modified: trunk/PerformanceTests/ChangeLog (110932 => 110933)
--- trunk/PerformanceTests/ChangeLog 2012-03-16 03:00:45 UTC (rev 110932)
+++ trunk/PerformanceTests/ChangeLog 2012-03-16 03:13:28 UTC (rev 110933)
@@ -1,3 +1,27 @@
+2012-03-15 Kentaro Hara <[email protected]>
+
+ [PerformanceTests] run-perf-tests should output correct units
+ https://bugs.webkit.org/show_bug.cgi?id=78303
+
+ Reviewed by Ryosuke Niwa.
+
+ Previously run-perf-tests just supported "ms" for units.
+ Consequently, Dromaeo perf tests had been reporting runs/s as "ms".
+ This patch fixes run-perf-tests so that they can support custom units.
+ The default unit is "ms".
+
+ The test result looks like this:
+
+ $ ./Tools/Scripts/run-perf-tests Dromaeo/dom-attr.html
+ RESULT Dromaeo: dom-attr= 6465.9525483 runs/s
+ median= 0.0 runs/s, stdev= 24.2983433436 runs/s, min= 6435.87649402 runs/s, max= 6515.63693392 runs/s
+
+ * Dromaeo/resources/dromaeorunner.js:
+ (.):
+ * resources/runner.js:
+ (PerfTestRunner.computeStatistics):
+ (PerfTestRunner.printStatistics):
+
2012-03-15 Alexis Menard <[email protected]>
Fix the test failing with run-perf-tests.
Modified: trunk/PerformanceTests/Dromaeo/resources/dromaeorunner.js (110932 => 110933)
--- trunk/PerformanceTests/Dromaeo/resources/dromaeorunner.js 2012-03-16 03:00:45 UTC (rev 110932)
+++ trunk/PerformanceTests/Dromaeo/resources/dromaeorunner.js 2012-03-16 03:13:28 UTC (rev 110933)
@@ -18,7 +18,8 @@
mean: mean,
min: min,
max: max,
- stdev: Math.sqrt(varsum)
+ stdev: Math.sqrt(varsum),
+ unit: "runs/s"
};
},
@@ -32,7 +33,7 @@
DRT.targetDocument = iframe.contentDocument;
DRT.targetWindow = iframe.contentDocument.defaultView;
});
-
+
window.addEventListener(
"message",
function(event) {
Modified: trunk/PerformanceTests/resources/runner.js (110932 => 110933)
--- trunk/PerformanceTests/resources/runner.js 2012-03-16 03:00:45 UTC (rev 110932)
+++ trunk/PerformanceTests/resources/runner.js 2012-03-16 03:13:28 UTC (rev 110933)
@@ -75,6 +75,7 @@
}
result.variance = squareSum / data.length;
result.stdev = Math.sqrt(result.variance);
+ result.unit = "ms";
return result;
}
@@ -87,11 +88,11 @@
PerfTestRunner.printStatistics = function (statistics) {
this.log("");
- this.log("avg " + statistics.mean);
- this.log("median " + statistics.median);
- this.log("stdev " + statistics.stdev);
- this.log("min " + statistics.min);
- this.log("max " + statistics.max);
+ this.log("avg " + statistics.mean + " " + statistics.unit);
+ this.log("median " + statistics.median + " " + statistics.unit);
+ this.log("stdev " + statistics.stdev + " " + statistics.unit);
+ this.log("min " + statistics.min + " " + statistics.unit);
+ this.log("max " + statistics.max + " " + statistics.unit);
}
PerfTestRunner.gc = function () {
Modified: trunk/Tools/ChangeLog (110932 => 110933)
--- trunk/Tools/ChangeLog 2012-03-16 03:00:45 UTC (rev 110932)
+++ trunk/Tools/ChangeLog 2012-03-16 03:13:28 UTC (rev 110933)
@@ -1,3 +1,24 @@
+2012-03-15 Kentaro Hara <[email protected]>
+
+ [PerformanceTests] run-perf-tests should output correct units
+ https://bugs.webkit.org/show_bug.cgi?id=78303
+
+ Reviewed by Ryosuke Niwa.
+
+ Previously run-perf-tests just supported "ms" for units.
+ Consequently, Dromaeo perf tests had been reporting runs/s as "ms".
+ This patch fixes run-perf-tests so that they can support custom units.
+ The default unit is "ms".
+
+ The test result looks like this:
+
+ $ ./Tools/Scripts/run-perf-tests Dromaeo/dom-attr.html
+ RESULT Dromaeo: dom-attr= 6465.9525483 runs/s
+ median= 0.0 runs/s, stdev= 24.2983433436 runs/s, min= 6435.87649402 runs/s, max= 6515.63693392 runs/s
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._process_parser_test_result):
+
2012-03-15 Brent Fulgham <[email protected]>
[WinCairo] Unreviewed build change after wtf path changes.
Modified: trunk/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py (110932 => 110933)
--- trunk/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py 2012-03-16 03:00:45 UTC (rev 110932)
+++ trunk/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py 2012-03-16 03:13:28 UTC (rev 110933)
@@ -284,11 +284,14 @@
test_name = filesystem.splitext(test_name)[0]
results = {}
keys = ['avg', 'median', 'stdev', 'min', 'max']
- score_regex = re.compile(r'^(' + r'|'.join(keys) + r')\s+([0-9\.]+)')
+ score_regex = re.compile(r'^(?P<key>' + r'|'.join(keys) + r')\s+(?P<value>[0-9\.]+)\s*(?P<unit>.*)')
+ unit = "ms"
for line in re.split('\n', output.text):
score = score_regex.match(line)
if score:
- results[score.group(1)] = float(score.group(2))
+ results[score.group('key')] = float(score.group('value'))
+ if score.group('unit'):
+ unit = score.group('unit')
continue
if not self._should_ignore_line_in_parser_test_result(line):
@@ -298,8 +301,8 @@
if test_failed or set(keys) != set(results.keys()):
return True
self._results[filesystem.join(category, test_name).replace('\\', '/')] = results
- self._buildbot_output.write('RESULT %s: %s= %s ms\n' % (category, test_name, results['avg']))
- self._buildbot_output.write(', '.join(['%s= %s ms' % (key, results[key]) for key in keys[1:]]) + '\n')
+ self._buildbot_output.write('RESULT %s: %s= %s %s\n' % (category, test_name, results['avg'], unit))
+ self._buildbot_output.write(', '.join(['%s= %s %s' % (key, results[key], unit) for key in keys[1:]]) + '\n')
return False
def _run_single_test(self, test, driver, is_chromium_style):