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

Unified Diff: tools/bisect-perf-regression.py

Issue 288843002: Fix bisect script to match a results with {mean, stddev} format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/bisect-perf-regression.py
diff --git a/tools/bisect-perf-regression.py b/tools/bisect-perf-regression.py
index 80d87ef29d35005b8f121972f5affd48df27c7f7..d6d29a9d54eff9c815dbd26781552d81dc2e9c8c 100755
--- a/tools/bisect-perf-regression.py
+++ b/tools/bisect-perf-regression.py
@@ -1953,6 +1953,8 @@ class BisectPerformanceMetrics(object):
for current_line in text_lines:
# Parse the output from the performance test for the metric we're
# interested in.
+ # The log will be parsed looking for format:
+ # <*>RESULT <graph_name>: <trace_name>= <value>
metric_re = metric_formatted +\
"(\s)*(?P<values>[0-9]+(\.[0-9]*)?)"
metric_re = re.compile(metric_re)
@@ -1961,6 +1963,8 @@ class BisectPerformanceMetrics(object):
if not regex_results is None:
values_list += [regex_results.group('values')]
else:
+ # The log will be parsed looking for format:
+ # <*>RESULT <graph_name>: <trace_name>= [<value>,value,value,...]
metric_re = metric_formatted +\
"(\s)*\[(\s)*(?P<values>[0-9,.]+)\]"
metric_re = re.compile(metric_re)
@@ -1970,6 +1974,18 @@ class BisectPerformanceMetrics(object):
metric_values = regex_results.group('values')
values_list += metric_values.split(',')
+ else:
+ # The log will be parsed looking for format:
+ # <*>RESULT <graph_name>: <trace_name>= {<mean>, <std deviation>}
qyearsley 2014/05/14 22:28:33 It would probably be neater/more readable to put t
prasadv 2014/05/15 19:49:09 Agreed, tried to trim this method and make it more
+ metric_re = metric_formatted +\
+ "(\s)*\{(\s)*(?P<values>[-\d\., ]+)\}"
+ metric_re = re.compile(metric_re)
+ regex_results = metric_re.search(current_line)
+ if not regex_results is None:
+ metric_values = regex_results.group('values')
+ if metric_values:
+ # Here we are interested only in mean.
+ values_list += [metric_values.split(',')[0]]
values_list = [float(v) for v in values_list if IsStringFloat(v)]
« 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