Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Unified Diff: tools/perf/benchmarks/speedometer.py

Issue 503053005: Add Suites results to Speedometer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove debugging code Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/speedometer.py
diff --git a/tools/perf/benchmarks/speedometer.py b/tools/perf/benchmarks/speedometer.py
index 9ee9ac2e3f9b48461d96455a0f1493d0700a7070..ceb06a0e7e9c8ed3b53ed7e84622803c2bba3bee 100644
--- a/tools/perf/benchmarks/speedometer.py
+++ b/tools/perf/benchmarks/speedometer.py
@@ -25,16 +25,46 @@ from telemetry.value import list_of_scalar_values
class SpeedometerMeasurement(page_test.PageTest):
+ enabled_suites = [
+ 'VanillaJS-TodoMVC',
+ 'EmberJS-TodoMVC',
+ 'BackboneJS-TodoMVC',
+ 'jQuery-TodoMVC',
+ 'AngularJS-TodoMVC',
+ 'React-TodoMVC',
+ 'FlightJS-TodoMVC'
+ ]
def ValidateAndMeasurePage(self, page, tab, results):
tab.WaitForDocumentReadyStateToBeComplete()
- tab.ExecuteJavaScript('benchmarkClient.iterationCount = 10; startTest();')
+ tab.ExecuteJavaScript("""
+ // Store all the results in the benchmarkClient
+ benchmarkClient._measuredValues = []
+ benchmarkClient.didRunSuites = function (measuredValues) {
tonyg 2014/08/25 22:32:13 uber-nit: no space after "function"
fmeawad 2014/08/25 22:49:24 Done.
+ benchmarkClient._measuredValues.push(measuredValues);
+ benchmarkClient._timeValues.push(measuredValues.total);
+ };
+ benchmarkClient.iterationCount = 10;
+ startTest();
+ """)
tab.WaitForJavaScriptExpression(
'benchmarkClient._finishedTestCount == benchmarkClient.testsCount', 600)
results.AddValue(list_of_scalar_values.ListOfScalarValues(
page, 'Total', 'ms',
tab.EvaluateJavaScript('benchmarkClient._timeValues')))
tonyg 2014/08/25 22:32:13 There's an optional "important" arg. I forget the
fmeawad 2014/08/25 22:49:24 Default was true. Added in both to make it more re
+ # Extract the timings for each suite
+ for suite_name in self.enabled_suites:
+ results.AddValue(list_of_scalar_values.ListOfScalarValues(
+ page, suite_name, 'ms',
+ tab.EvaluateJavaScript("""
+ var suite_times = [];
+ for(var i = 0; i < benchmarkClient.iterationCount; i++) {
+ suite_times.push(
+ benchmarkClient._measuredValues[i].tests['%s'].total);
+ };
+ suite_times;
+ """ % suite_name)))
@benchmark.Disabled('android') # Times out
class Speedometer(benchmark.Benchmark):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698