tools/perf/cli_tools/soundwave/tables/alerts.py
def _RowFromJson(data):
  """Turn json data from an alert into a tuple with values for that record."""
  data = data.copy()  # Do not modify the original dict.

  # Name fields using newer dashboard nomenclature.
  data['test_suite'] = data.pop('testsuite')
  raw_test = data.pop('test')
  if '/' in raw_test:
    data['measurement'], data['test_case'] = raw_test.split('/', 1)
  else:
    # Alert was on a summary metric, i.e. a summary of the measurement across
    # multiple test cases. Therefore, no test_case is associated with it.
    data['measurement'], data['test_case'] = raw_test, None
  data['bot'] = '/'.join([data.pop('master'), data.pop('bot')])

  # Separate bug_id from alert status.
  data['status'] = _CODE_TO_STATUS.get(data['bug_id'], 'triaged')
  if data['status'] == 'triaged':
    assert data['bug_id'] > 0
  else:
    # pandas cannot hold both int and None values in the same series, if so the
    # type is coerced into float; to prevent this we use 0 to denote untriaged
    # alerts with no bug_id assigned.
    data['bug_id'] = 0

  return tuple(data[k] for k in COLUMNS)
Turn json data from an alert into a tuple with values for that record.
Turn json data from an alert into a tuple with values for that record.
Turn json data from an alert into a tuple with values for that record .
def _RowFromJson(data):
  data = data.copy()  
  data['test_suite'] = data.pop('testsuite')
  raw_test = data.pop('test')
  if '/' in raw_test:
    data['measurement'], data['test_case'] = raw_test.split('/', 1)
  else:
    data['measurement'], data['test_case'] = raw_test, None
  data['bot'] = '/'.join([data.pop('master'), data.pop('bot')])
  data['status'] = _CODE_TO_STATUS.get(data['bug_id'], 'triaged')
  if data['status'] == 'triaged':
    assert data['bug_id'] > 0
  else:
    data['bug_id'] = 0
  return tuple(data[k] for k in COLUMNS)
def _RowFromJson ( data ) : data = data . copy ( ) data [ 'test_suite' ] = data . pop ( 'testsuite' ) raw_test = data . pop ( 'test' ) if '/' in raw_test : data [ 'measurement' ] , data [ 'test_case' ] = raw_test . split ( '/' , 1 ) else : data [ 'measurement' ] , data [ 'test_case' ] = raw_test , None data [ 'bot' ] = '/' . join ( [ data . pop ( 'master' ) , data . pop ( 'bot' ) ] ) data [ 'status' ] = _CODE_TO_STATUS . get ( data [ 'bug_id' ] , 'triaged' ) if data [ 'status' ] == 'triaged' : assert data [ 'bug_id' ] > 0 else : data [ 'bug_id' ] = 0 return tuple ( data [ k ] for k in COLUMNS )
Turn json data from an alert into a tuple with values for that record.
Turn json data from an alert into a tuple with values for that record .
"""Turn json data from an alert into a tuple with values for that record.""" # Do not modify the original dict. # Name fields using newer dashboard nomenclature. # Alert was on a summary metric, i.e. a summary of the measurement across # multiple test cases. Therefore, no test_case is associated with it. # Separate bug_id from alert status. # pandas cannot hold both int and None values in the same series, if so the # type is coerced into float; to prevent this we use 0 to denote untriaged # alerts with no bug_id assigned.
data