diff options
author | bensong@google.com <bensong@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-05 01:31:56 +0000 |
---|---|---|
committer | bensong@google.com <bensong@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-05 01:31:56 +0000 |
commit | 967b25806585f2438d46c1c05b5016a19329d975 (patch) | |
tree | 64f20469c7e53c7933e50b0370df3beb94285ca4 | |
parent | 498aafadd537b7ed7ab4ee9637bc7cf350e3ce59 (diff) |
Fixes bench_util's CONFIG_RE to cope with space flexibility.
The real "fix" down the road is Joe's ongoing work of switching to JSON.
Review URL: https://codereview.chromium.org/103943004
git-svn-id: http://skia.googlecode.com/svn/trunk@12498 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | bench/bench_util.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bench/bench_util.py b/bench/bench_util.py index f2603f944b..9b7d296fa9 100644 --- a/bench/bench_util.py +++ b/bench/bench_util.py @@ -13,13 +13,13 @@ ALGORITHM_MEDIAN = 'med' 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 @@ def _ParseAndStoreTimes(config_re_compiled, is_per_tile, line, bench, 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. |