Exemple #1
0
def _upload_perf_results(json_to_upload, name, configuration_name,
                         build_properties, oauth_file, tmp_dir):
    """Upload the contents of result JSON(s) to the perf dashboard."""
    build_properties = json.loads(build_properties)
    if not configuration_name:
        # we are deprecating perf-id crbug.com/817823
        configuration_name = build_properties['buildername']
    args = [
        '--tmp-dir',
        tmp_dir,
        '--buildername',
        build_properties['buildername'],
        '--buildnumber',
        build_properties['buildnumber'],
        '--name',
        name,
        '--configuration-name',
        configuration_name,
        '--results-file',
        json_to_upload,
        '--results-url',
        RESULTS_URL,
        '--got-revision-cp',
        build_properties['got_revision_cp'],
        '--got-v8-revision',
        build_properties['got_v8_revision'],
        '--got-webrtc-revision',
        build_properties['got_webrtc_revision'],
        '--oauth-token-file',
        oauth_file,
    ]
    if _is_histogram(json_to_upload):
        args.append('--send-as-histograms')

    upload_results_to_perf_dashboard.main(args)
Exemple #2
0
def _upload_perf_results(json_to_upload, name, configuration_name,
                         build_properties):
    """Upload the contents of result JSON(s) to the perf dashboard."""
    build_properties = json.loads(build_properties)
    args = [
        '--build-dir',
        '/b/c/b/obbs_fyi/src/out',
        '--buildername',
        build_properties['buildername'],
        '--buildnumber',
        build_properties['buildnumber'],
        '--name',
        name,
        '--configuration-name',
        configuration_name,
        '--results-file',
        json_to_upload,
        '--results-url',
        RESULTS_URL,
        '--got-revision-cp',
        build_properties['got_revision_cp'],
        '--got-v8-revision',
        build_properties['got_v8_revision'],
        '--got-webrtc-revision',
        build_properties['got_webrtc_revision'],
        '--chromium-checkout-dir',
        '/b/c/b/obbs_fyi',
        '--send-as-histograms',
    ]
    upload_results_to_perf_dashboard.main(args)
Exemple #3
0
def _upload_perf_results(json_to_upload, name, configuration_name, build_properties,
                         output_json_file):
    """Upload the contents of result JSON(s) to the perf dashboard."""
    args = [
        '--buildername',
        build_properties['buildername'],
        '--buildnumber',
        build_properties['buildnumber'],
        '--name',
        name,
        '--configuration-name',
        configuration_name,
        '--results-file',
        json_to_upload,
        '--results-url',
        RESULTS_URL,
        '--output-json-file',
        output_json_file,
        '--perf-dashboard-machine-group',
        MACHINE_GROUP,
        '--got-angle-revision',
        build_properties['got_angle_revision'],
        '--send-as-histograms',
        '--project',
        'angle',
    ]

    if build_properties.get('git_revision'):
        args.append('--git-revision')
        args.append(build_properties['git_revision'])

    #TODO(crbug.com/1072729): log this in top level
    logging.info('upload_results_to_perf_dashboard: %s.' % args)

    return upload_results_to_perf_dashboard.main(args)
def _upload_perf_results(json_to_upload, name, configuration_name,
    build_properties, service_account_file, output_json_file):
  """Upload the contents of result JSON(s) to the perf dashboard."""
  args= [
      '--buildername', build_properties['buildername'],
      '--buildnumber', build_properties['buildnumber'],
      '--name', name,
      '--configuration-name', configuration_name,
      '--results-file', json_to_upload,
      '--results-url', RESULTS_URL,
      '--got-revision-cp', build_properties['got_revision_cp'],
      '--got-v8-revision', build_properties['got_v8_revision'],
      '--got-webrtc-revision', build_properties['got_webrtc_revision'],
      '--output-json-file', output_json_file,
      '--perf-dashboard-machine-group', _GetMachineGroup(build_properties)
  ]
  is_luci = False
  buildbucket = build_properties.get('buildbucket', {})
  if isinstance(buildbucket, basestring):
    buildbucket = json.loads(buildbucket)
  if ('build' in buildbucket and
      buildbucket['build'].get('bucket') == 'luci.chrome.ci'):
    is_luci = True

  if service_account_file and not is_luci:
    args += ['--service-account-file', service_account_file]

  if build_properties.get('git_revision'):
    args.append('--git-revision')
    args.append(build_properties['git_revision'])
  if _is_histogram(json_to_upload):
    args.append('--send-as-histograms')

  return upload_results_to_perf_dashboard.main(args)
Exemple #5
0
def _upload_perf_results(json_to_upload, name, configuration_name,
    build_properties, oauth_file, tmp_dir, output_json_file):
  """Upload the contents of result JSON(s) to the perf dashboard."""
  args = [
      '--tmp-dir', tmp_dir,
      '--buildername', build_properties['buildername'],
      '--buildnumber', build_properties['buildnumber'],
      '--name', name,
      '--configuration-name', configuration_name,
      '--results-file', json_to_upload,
      '--results-url', RESULTS_URL,
      '--got-revision-cp', build_properties['got_revision_cp'],
      '--got-v8-revision', build_properties['got_v8_revision'],
      '--got-webrtc-revision', build_properties['got_webrtc_revision'],
      '--oauth-token-file', oauth_file,
      '--output-json-file', output_json_file,
      '--perf-dashboard-machine-group', _GetMachineGroup(build_properties)
  ]
  if build_properties.get('git_revision'):
    args.append('--git-revision')
    args.append(build_properties['git_revision'])
  if _is_histogram(json_to_upload):
    args.append('--send-as-histograms')

  return upload_results_to_perf_dashboard.main(args)
def _upload_perf_results(json_to_upload, name, configuration_name,
                         build_properties, service_account_file,
                         output_json_file):
    """Upload the contents of result JSON(s) to the perf dashboard."""
    args = [
        '--buildername', build_properties['buildername'], '--buildnumber',
        build_properties['buildnumber'], '--name', name,
        '--configuration-name', configuration_name, '--results-file',
        json_to_upload, '--results-url', RESULTS_URL, '--got-revision-cp',
        build_properties['got_revision_cp'], '--got-v8-revision',
        build_properties['got_v8_revision'], '--got-webrtc-revision',
        build_properties['got_webrtc_revision'], '--output-json-file',
        output_json_file, '--perf-dashboard-machine-group',
        _GetMachineGroup(build_properties)
    ]
    is_luci = False
    buildbucket = build_properties.get('buildbucket', {})
    if isinstance(buildbucket, basestring):
        buildbucket = json.loads(buildbucket)
    if ('build' in buildbucket
            and buildbucket['build'].get('bucket') == 'luci.chrome.ci'):
        is_luci = True

    if is_luci and _is_gtest(json_to_upload) and (
            name in GTEST_CONVERSION_WHITELIST):
        path_util.AddTracingToPath()
        from tracing.value import (  # pylint: disable=no-name-in-module
            gtest_json_converter)
        gtest_json_converter.ConvertGtestJsonFile(json_to_upload)
        _data_format_cache[json_to_upload] = DATA_FORMAT_HISTOGRAMS

    if 'build' in buildbucket:
        args += [
            '--project',
            buildbucket['build'].get('project'),
            '--buildbucket',
            buildbucket['build'].get('bucket'),
        ]

    if service_account_file and not is_luci:
        args += ['--service-account-file', service_account_file]

    if build_properties.get('git_revision'):
        args.append('--git-revision')
        args.append(build_properties['git_revision'])
    if _is_histogram(json_to_upload):
        args.append('--send-as-histograms')

    return upload_results_to_perf_dashboard.main(args)
Exemple #7
0
def _upload_perf_results(json_to_upload, name, configuration_name,
                         build_properties, output_json_file):
    """Upload the contents of result JSON(s) to the perf dashboard."""
    args = [
        '--buildername', build_properties['buildername'], '--buildnumber',
        build_properties['buildnumber'], '--name', name,
        '--configuration-name', configuration_name, '--results-file',
        json_to_upload, '--results-url', RESULTS_URL, '--got-revision-cp',
        build_properties['got_revision_cp'], '--got-v8-revision',
        build_properties['got_v8_revision'], '--got-webrtc-revision',
        build_properties['got_webrtc_revision'], '--output-json-file',
        output_json_file, '--perf-dashboard-machine-group',
        _GetMachineGroup(build_properties)
    ]
    buildbucket = build_properties.get('buildbucket', {})
    if isinstance(buildbucket, basestring):
        buildbucket = json.loads(buildbucket)

    if 'build' in buildbucket:
        args += [
            '--project',
            buildbucket['build'].get('project'),
            '--buildbucket',
            buildbucket['build'].get('bucket'),
        ]

    if build_properties.get('git_revision'):
        args.append('--git-revision')
        args.append(build_properties['git_revision'])
    if _is_histogram(json_to_upload):
        args.append('--send-as-histograms')

    #TODO(crbug.com/1072729): log this in top level
    logging.info('upload_results_to_perf_dashboard: %s.' % args)

    return upload_results_to_perf_dashboard.main(args)