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

Unified Diff: scripts/slave/runtest.py

Issue 2346963003: Updating perf recipe for disabled chartjson data. (Closed)
Patch Set: Responding to review comments Created 4 years, 3 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/runtest.py
diff --git a/scripts/slave/runtest.py b/scripts/slave/runtest.py
index a4f633acd21c4e6cf804ada708651788280bc1c3..9afdbbc21b8a2b259c6a94c10ac701d5249992fa 100755
--- a/scripts/slave/runtest.py
+++ b/scripts/slave/runtest.py
@@ -677,9 +677,9 @@ def _WriteChartJsonToOutput(chartjson_file, log_processor, args):
assert log_processor.IsChartJson()
chartjson_data = _GenerateDashboardJson(log_processor, args)
-
- with open(chartjson_file, 'w') as f:
- json.dump(chartjson_data, f)
+ if chartjson_data:
+ with open(chartjson_file, 'w') as f:
+ json.dump(chartjson_data, f)
def _SendResultsToDashboard(log_processor, args):
@@ -700,11 +700,19 @@ def _SendResultsToDashboard(log_processor, args):
results = None
if log_processor.IsChartJson():
- results = _GenerateDashboardJson(log_processor, args)
- if not results:
+ chartjson_results = _GenerateDashboardJson(log_processor, args)
+ if not chartjson_results:
print 'Error: No json output from telemetry.'
print '@@@STEP_FAILURE@@@'
log_processor.Cleanup()
+ if not chartjson_results:
+ return False
+ if chartjson_results['chart_data'].get('enabled', True):
+ results = chartjson_results
+ else:
+ # This benchmark was disabled so don't send results to the dashboard
+ # but it was a successful run.
+ return True
perezju 2016/09/26 15:48:06 suggestion, maybe just keep the variable name as |
eyaich1 2016/09/26 16:28:29 Done.
else:
charts = _GetDataFromLogProcessor(log_processor)
results = results_dashboard.MakeListOfPoints(
« no previous file with comments | « no previous file | scripts/slave/unittests/results_dashboard_test.py » ('j') | scripts/slave/unittests/runtest_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698