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

Unified Diff: bench/bench_util.py

Issue 103943004: Fixes bench_util's CONFIG_RE to cope with space flexibility. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years 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: bench/bench_util.py
===================================================================
--- bench/bench_util.py (revision 12496)
+++ bench/bench_util.py (working copy)
@@ -13,13 +13,13 @@
ALGORITHM_MINIMUM = 'min'
ALGORITHM_25TH_PERCENTILE = '25th'
-# Regular expressions used throughout
+# Regular expressions used throughout.
PER_SETTING_RE = '([^\s=]+)(?:=(\S+))?'
SETTINGS_RE = 'skia bench:((?:\s+' + PER_SETTING_RE + ')*)'
BENCH_RE = 'running bench (?:\[\d+ \d+\] )?\s*(\S+)'
TIME_RE = '(?:(\w*)msecs = )?\s*((?:\d+\.\d+)(?:,\s*\d+\.\d+)*)'
# non-per-tile benches have configs that don't end with ']' or '>'
-CONFIG_RE = '(\S+[^\]>]): ((?:' + TIME_RE + '\s+)+)'
+CONFIG_RE = '(\S+[^\]>]):\s+((?:' + TIME_RE + '\s+)+)'
# per-tile bench lines are in the following format. Note that there are
# non-averaged bench numbers in separate lines, which we ignore now due to
# their inaccuracy.
@@ -141,6 +141,8 @@
layout_dic.setdefault(bench, {}).setdefault(
current_config, {}).setdefault(current_time_type, tile_layout)
+# TODO(bensong): switch to reading JSON output when available. This way we don't
+# need the RE complexities.
def parse(settings, lines, representation=None):
"""Parses bench output into a useful data structure.
« 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