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

Side by Side Diff: scripts/slave/results_dashboard.py

Issue 2346963003: Updating perf recipe for disabled chartjson data. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/runtest.py » ('j') | scripts/slave/runtest.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Functions for adding results to perf dashboard.""" 6 """Functions for adding results to perf dashboard."""
7 7
8 import calendar 8 import calendar
9 import datetime 9 import datetime
10 import httplib 10 import httplib
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 this includes revisions and annotation data. 233 this includes revisions and annotation data.
234 is_ref: True if this is a reference build, False otherwise. 234 is_ref: True if this is a reference build, False otherwise.
235 235
236 Returns: 236 Returns:
237 A dictionary in the format accepted by the perf dashboard. 237 A dictionary in the format accepted by the perf dashboard.
238 """ 238 """
239 if not chart_json: 239 if not chart_json:
240 print 'Error: No json output from telemetry.' 240 print 'Error: No json output from telemetry.'
241 print '@@@STEP_FAILURE@@@' 241 print '@@@STEP_FAILURE@@@'
242 242
243 # If benchmark was disabled it is a success, so just return the
244 # given chart_json since no results will be written to dashboard
245 if chart_json['disabled']:
perezju 2016/09/22 08:50:27 change this to chart_json.get('disabled', False),
eyaich1 2016/09/26 15:22:11 Done.
246 return (True, chart_json)
perezju 2016/09/22 08:50:27 I don't like this change. I think we still want th
eyaich1 2016/09/26 15:22:11 I went with #2. My original thinking was that I r
247
243 # The master name used for the dashboard is the CamelCase name returned by 248 # The master name used for the dashboard is the CamelCase name returned by
244 # GetActiveMaster(), and not the canonical master name with dots. 249 # GetActiveMaster(), and not the canonical master name with dots.
245 master = slave_utils.GetActiveMaster() 250 master = slave_utils.GetActiveMaster()
246 point_id, versions = _RevisionNumberColumns(revision_dict, prefix='') 251 point_id, versions = _RevisionNumberColumns(revision_dict, prefix='')
247 252
248 supplemental = {} 253 supplemental = {}
249 for key in supplemental_dict: 254 for key in supplemental_dict:
250 if key.startswith('r_'): 255 if key.startswith('r_'):
251 versions[key.replace('r_', '', 1)] = supplemental_dict[key] 256 versions[key.replace('r_', '', 1)] = supplemental_dict[key]
252 if key.startswith('a_'): 257 if key.startswith('a_'):
(...skipping 11 matching lines...) Expand all
264 fields = { 269 fields = {
265 'master': master, 270 'master': master,
266 'bot': bot, 271 'bot': bot,
267 'test_suite_name': test_name, 272 'test_suite_name': test_name,
268 'point_id': point_id, 273 'point_id': point_id,
269 'supplemental': supplemental, 274 'supplemental': supplemental,
270 'versions': versions, 275 'versions': versions,
271 'chart_data': chart_json, 276 'chart_data': chart_json,
272 'is_ref': is_ref, 277 'is_ref': is_ref,
273 } 278 }
274 return fields 279 return (False, fields)
275 280
276 281
277 def _GetStdioUriColumn(test_name, buildername, buildnumber): 282 def _GetStdioUriColumn(test_name, buildername, buildnumber):
278 """Gets a supplemental column containing buildbot stdio link.""" 283 """Gets a supplemental column containing buildbot stdio link."""
279 if not buildername or not buildnumber: 284 if not buildername or not buildnumber:
280 return {} 285 return {}
281 286
282 url = '%sbuilders/%s/builds/%s/steps/%s/logs/stdio' % ( 287 url = '%sbuilders/%s/builds/%s/steps/%s/logs/stdio' % (
283 _GetBuildBotUrl(), 288 _GetBuildBotUrl(),
284 urllib.quote(buildername), 289 urllib.quote(buildername),
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 master, bot, test, revision = ( 431 master, bot, test, revision = (
427 data[0]['master'], data[0]['bot'], data[0]['test'], data[0]['revision']) 432 data[0]['master'], data[0]['bot'], data[0]['test'], data[0]['revision'])
428 else: 433 else:
429 master, bot, test, revision = ( 434 master, bot, test, revision = (
430 data['master'], data['bot'], data['chart_data']['benchmark_name'], 435 data['master'], data['bot'], data['chart_data']['benchmark_name'],
431 data['point_id']) 436 data['point_id'])
432 results_link = url + RESULTS_LINK_PATH % ( 437 results_link = url + RESULTS_LINK_PATH % (
433 urllib.quote(master), urllib.quote(bot), urllib.quote(test.split('/')[0]), 438 urllib.quote(master), urllib.quote(bot), urllib.quote(test.split('/')[0]),
434 revision) 439 revision)
435 return '@@@STEP_LINK@%s@%s@@@' % ('Results Dashboard', results_link) 440 return '@@@STEP_LINK@%s@%s@@@' % ('Results Dashboard', results_link)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/runtest.py » ('j') | scripts/slave/runtest.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698