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

Unified Diff: tools/run_perf.py

Issue 498163002: Make benchmark runner understand chromium perf output. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 2 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 | tools/unittests/run_perf_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/run_perf.py
diff --git a/tools/run_perf.py b/tools/run_perf.py
index 920c18d24aac8b4b51d0a3798fbc52ba22a0cf12..da139d7a6b871a43f71714e5785acf190755965e 100755
--- a/tools/run_perf.py
+++ b/tools/run_perf.py
@@ -91,6 +91,7 @@ Full example (suite with several runners):
Path pieces are concatenated. D8 is always run with the suite's path as cwd.
"""
+from collections import OrderedDict
import json
import math
import optparse
@@ -114,8 +115,10 @@ SUPPORTED_ARCHS = ["android_arm",
"x64",
"arm64"]
-GENERIC_RESULTS_RE = re.compile(
- r"^Trace\(([^\)]+)\), Result\(([^\)]+)\), StdDev\(([^\)]+)\)$")
+GENERIC_RESULTS_RE = re.compile(r"^RESULT ([^:]+): ([^=]+)= ([^ ]+) ([^ ]*)$")
+RESULT_STDDEV_RE = re.compile(r"^\{([^\}]+)\}$")
+RESULT_LIST_RE = re.compile(r"^\[([^\]]+)\]$")
+
def GeometricMean(values):
@@ -334,21 +337,33 @@ class RunnableGeneric(Runnable):
def Run(self, runner):
"""Iterates over several runs and handles the output."""
- traces = {}
+ traces = OrderedDict()
for stdout in runner():
for line in stdout.strip().splitlines():
match = GENERIC_RESULTS_RE.match(line)
if match:
- trace = match.group(1)
- result = match.group(2)
- stddev = match.group(3)
+ stddev = ""
+ graph = match.group(1)
+ trace = match.group(2)
+ body = match.group(3)
+ units = match.group(4)
+ match_stddev = RESULT_STDDEV_RE.match(body)
+ match_list = RESULT_LIST_RE.match(body)
+ if match_stddev:
+ result, stddev = map(str.strip, match_stddev.group(1).split(","))
+ results = [result]
+ elif match_list:
+ results = map(str.strip, match_list.group(1).split(","))
+ else:
+ results = [body.strip()]
+
trace_result = traces.setdefault(trace, Results([{
- "graphs": self.graphs + [trace],
- "units": self.units,
+ "graphs": self.graphs + [graph, trace],
+ "units": (units or self.units).strip(),
"results": [],
"stddev": "",
}], []))
- trace_result.traces[0]["results"].append(result)
+ trace_result.traces[0]["results"].extend(results)
trace_result.traces[0]["stddev"] = stddev
return reduce(lambda r, t: r + t, traces.itervalues(), Results())
« no previous file with comments | « no previous file | tools/unittests/run_perf_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698