Skip to content

Commit

Permalink
[Telemetry] fix maps.py benchmark
Browse files Browse the repository at this point in the history
The value of total time and render time from regular expression matching
are strings, not numbers. Do the conversion before adding to scalar
value.

BUG=None

Review URL: https://codereview.chromium.org/876063004

Cr-Commit-Position: refs/heads/master@{#315958}
  • Loading branch information
deanliao authored and Commit bot committed Feb 12, 2015
1 parent e7d8d8b commit c91bd8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/benchmarks/maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def ValidateAndMeasurePage(self, page, tab, results):
total = re.search('total=([0-9]+)', test_results).group(1)
render = re.search('render=([0-9.]+),([0-9.]+)', test_results).group(2)
results.AddValue(scalar.ScalarValue(
results.current_page, 'total_time', 'ms', total))
results.current_page, 'total_time', 'ms', int(total)))
results.AddValue(scalar.ScalarValue(
results.current_page, 'render_mean_time', 'ms', render))
results.current_page, 'render_mean_time', 'ms', float(render)))

class MapsPage(page_module.Page):
def __init__(self, page_set, base_dir):
Expand Down

0 comments on commit c91bd8a

Please sign in to comment.