Title: [221044] trunk/PerformanceTests
- Revision
- 221044
- Author
- rn...@webkit.org
- Date
- 2017-08-22 14:00:49 -0700 (Tue, 22 Aug 2017)
Log Message
Speedometer 2.0: Make it possible to change the iteration count via query string
https://bugs.webkit.org/show_bug.cgi?id=175811
Reviewed by Saam Barati.
Added the support for specifying the iteration count by "iterationCount" query parameter, and replaced "ms"
query parameter by "unit=ms".
Finally, reduced the number of iterations from 20 to 10 to reduce the time needed to run the benchmark
since Speedometer 2.0 contains more than twice the number of libraries and frameworks than Speedometer 1.0.
* Speedometer/resources/main.js:
(window.benchmarkClient.didFinishLastIteration):
(startBenchmark):
Modified Paths
Diff
Modified: trunk/PerformanceTests/ChangeLog (221043 => 221044)
--- trunk/PerformanceTests/ChangeLog 2017-08-22 20:53:15 UTC (rev 221043)
+++ trunk/PerformanceTests/ChangeLog 2017-08-22 21:00:49 UTC (rev 221044)
@@ -1,3 +1,20 @@
+2017-08-22 Ryosuke Niwa <rn...@webkit.org>
+
+ Speedometer 2.0: Make it possible to change the iteration count via query string
+ https://bugs.webkit.org/show_bug.cgi?id=175811
+
+ Reviewed by Saam Barati.
+
+ Added the support for specifying the iteration count by "iterationCount" query parameter, and replaced "ms"
+ query parameter by "unit=ms".
+
+ Finally, reduced the number of iterations from 20 to 10 to reduce the time needed to run the benchmark
+ since Speedometer 2.0 contains more than twice the number of libraries and frameworks than Speedometer 1.0.
+
+ * Speedometer/resources/main.js:
+ (window.benchmarkClient.didFinishLastIteration):
+ (startBenchmark):
+
2017-08-22 Mathias Bynens <math...@qiwi.be>
Speedometer: Add missing stylesheet to Angular example
Modified: trunk/PerformanceTests/Speedometer/resources/main.js (221043 => 221044)
--- trunk/PerformanceTests/Speedometer/resources/main.js 2017-08-22 20:53:15 UTC (rev 221043)
+++ trunk/PerformanceTests/Speedometer/resources/main.js 2017-08-22 21:00:49 UTC (rev 221044)
@@ -1,5 +1,6 @@
window.benchmarkClient = {
- iterationCount: 20,
+ displayUnit: 'runs/min',
+ iterationCount: 10,
testsCount: null,
suitesCount: null,
_timeValues: [],
@@ -30,8 +31,7 @@
didFinishLastIteration: function () {
document.getElementById('logo-link')._onclick_ = null;
- var displayUnit = location.search == '?ms' || location.hash == '#ms' ? 'ms' : 'runs/min';
- var results = this._computeResults(this._timeValues, displayUnit);
+ var results = this._computeResults(this._timeValues, this.displayUnit);
this._updateGaugeNeedle(results.mean);
document.getElementById('result-number').textContent = results.formattedMean;
@@ -41,7 +41,7 @@
this._populateDetailedResults(results.formattedValues);
document.getElementById('results-with-statistics').textContent = results.formattedMeanAndDelta;
- if (displayUnit == 'ms') {
+ if (this.displayUnit == 'ms') {
document.getElementById('show-summary').style.display = 'none';
showResultDetails();
} else
@@ -150,6 +150,30 @@
}
function startBenchmark() {
+ if (location.search.length > 1) {
+ var parts = location.search.substring(1).split('&');
+ for (var i = 0; i < parts.length; i++) {
+ var keyValue = parts[i].split('=');
+ var key = keyValue[0];
+ var value = keyValue[1];
+ switch (key) {
+ case 'unit':
+ if (value == 'ms')
+ benchmarkClient.displayUnit = 'ms';
+ else
+ console.error('Invalid unit: ' + value);
+ break;
+ case 'iterationCount':
+ var parsedValue = parseInt(value);
+ if (!isNaN(value))
+ benchmarkClient.iterationCount = parsedValue;
+ else
+ console.error('Invalid iteration count: ' + value);
+ break;
+ }
+ }
+ }
+
var enabledSuites = Suites.filter(function (suite) { return !suite.disabled });
var totalSubtestCount = enabledSuites.reduce(function (testsCount, suite) { return testsCount + suite.tests.length; }, 0);
benchmarkClient.testsCount = benchmarkClient.iterationCount * totalSubtestCount;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes