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

Unified Diff: scripts/slave/recipe_modules/bisect_tester/parse_metric.py

Issue 1044543002: Lint bisect-related modules; obey pylint. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Rebased Created 5 years, 9 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
Index: scripts/slave/recipe_modules/bisect_tester/parse_metric.py
diff --git a/scripts/slave/recipe_modules/bisect_tester/parse_metric.py b/scripts/slave/recipe_modules/bisect_tester/parse_metric.py
index e9202654f21bb17c50f4790bb5c9ce7675423e00..e3a081c4a4dcfdcbf1657e52b095692ebdb84efa 100644
--- a/scripts/slave/recipe_modules/bisect_tester/parse_metric.py
+++ b/scripts/slave/recipe_modules/bisect_tester/parse_metric.py
@@ -1,5 +1,6 @@
import re
+
# The following has largely been copied from bisect_perf_regression.py
# TODO(robertocn): Look into the possibility of getting structured data from
# run_benchmark and similar scripts instead of this markup.
@@ -14,12 +15,13 @@ def parse_metric(out, err, metric): # pragma: no cover
A list of floating point numbers found.
"""
text = (out or '') + (err or '')
- result = _TryParseResultValuesFromOutput(metric, text)
+ result = _parse_result_values_from_output(metric, text)
if not result:
- result = _TryParseHistogramValuesFromOutput(metric, text)
+ result = _parse_histogram_values_from_output(metric, text)
return len(result), result
-def _TryParseResultValuesFromOutput(metric, text): # pragma: no cover
+
+def _parse_result_values_from_output(metric, text): # pragma: no cover
"""Attempts to parse a metric in the format RESULT <graph>: <trace>= ...
Args:
@@ -96,7 +98,7 @@ def _TryParseResultValuesFromOutput(metric, text): # pragma: no cover
return values_list
-def _TryParseHistogramValuesFromOutput(metric, text): # pragma: no cover
+def _parse_histogram_values_from_output(metric, text): # pragma: no cover
"""Attempts to parse a metric in the format HISTOGRAM <graph: <trace>.
Args:
« no previous file with comments | « scripts/slave/recipe_modules/bisect_tester/api.py ('k') | scripts/slave/recipe_modules/bisect_tester/perf_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698