tools/perf/core/results_processor/processor.py
def ExtractMeasurements(test_result):
  """Add ad-hoc measurements to histogram dicts"""
  artifacts = test_result.get('outputArtifacts', {})
  if MEASUREMENTS_NAME in artifacts:
    with open(artifacts[MEASUREMENTS_NAME]['filePath']) as f:
      measurements = json.load(f)['measurements']
    for name, measurement in measurements.items():
      test_result['_histograms'].AddHistogram(
          MeasurementToHistogram(name, measurement))
    del artifacts[MEASUREMENTS_NAME]
Add ad-hoc measurements to histogram dicts
Add ad-hoc measurements to histogram dicts
Add ad - hoc measurements to histogram dicts
def ExtractMeasurements(test_result):
  artifacts = test_result.get('outputArtifacts', {})
  if MEASUREMENTS_NAME in artifacts:
    with open(artifacts[MEASUREMENTS_NAME]['filePath']) as f:
      measurements = json.load(f)['measurements']
    for name, measurement in measurements.items():
      test_result['_histograms'].AddHistogram(
          MeasurementToHistogram(name, measurement))
    del artifacts[MEASUREMENTS_NAME]
def ExtractMeasurements ( test_result ) : artifacts = test_result . get ( 'outputArtifacts' , { } ) if MEASUREMENTS_NAME in artifacts : with open ( artifacts [ MEASUREMENTS_NAME ] [ 'filePath' ] ) as f : measurements = json . load ( f ) [ 'measurements' ] for name , measurement in measurements . items ( ) : test_result [ '_histograms' ] . AddHistogram ( MeasurementToHistogram ( name , measurement ) ) del artifacts [ MEASUREMENTS_NAME ]
Add ad-hoc measurements to histogram dicts
Add ad - hoc measurements to histogram dicts
"""Add ad-hoc measurements to histogram dicts"""
test_result