コード例 #1
0
def _GetDashboardHistogramData(options):
    revisions = {
        '--chromium_commit_positions':
        _GetMainRevision(options.got_revision_cp),
        '--chromium_revisions': options.git_revision
    }

    if options.got_webrtc_revision:
        revisions['--webrtc_revisions'] = options.got_webrtc_revision
    if options.got_v8_revision:
        revisions['--v8_revisions'] = options.got_v8_revision

    is_reference_build = 'reference' in options.name
    stripped_test_name = options.name.replace('.reference', '')

    begin_time = time.time()
    hs = results_dashboard.MakeHistogramSetWithDiagnostics(
        options.results_file,
        stripped_test_name,
        options.configuration_name,
        options.buildername,
        options.buildnumber,
        revisions,
        is_reference_build,
        perf_dashboard_machine_group=options.perf_dashboard_machine_group)
    end_time = time.time()
    print 'Duration of adding diagnostics for %s: %d seconds' % (
        stripped_test_name, end_time - begin_time)
    return hs
コード例 #2
0
def _GetDashboardHistogramData(options):
    revisions = {
        '--chromium_commit_positions':
        _GetMainRevision(options.got_revision_cp, options.build_dir),
        '--chromium_revisions':
        options.git_revision
    }

    if options.got_webrtc_revision:
        revisions['--webrtc_revisions'] = options.got_webrtc_revision
    if options.got_v8_revision:
        revisions['--v8_revisions'] = options.got_v8_revision

    is_reference_build = 'reference' in options.name
    stripped_test_name = options.name.replace('.reference', '')

    return results_dashboard.MakeHistogramSetWithDiagnostics(
        options.results_file,
        options.chromium_checkout_dir,
        stripped_test_name,
        options.configuration_name,
        options.buildername,
        options.buildnumber,
        revisions,
        is_reference_build,
        perf_dashboard_machine_group=_GetMachineGroup(options))
コード例 #3
0
def _GetDashboardHistogramData(options):
    revisions = {}

    if options.got_revision_cp:
        revisions['--chromium_commit_positions'] = \
            _CommitPositionNumber(options.got_revision_cp)
    if options.git_revision:
        revisions['--chromium_revisions'] = options.git_revision
    if options.got_webrtc_revision:
        revisions['--webrtc_revisions'] = options.got_webrtc_revision
    if options.got_v8_revision:
        revisions['--v8_revisions'] = options.got_v8_revision
    if options.got_angle_revision:
        revisions['--angle_revisions'] = options.got_angle_revision

    is_reference_build = 'reference' in options.name
    stripped_test_name = options.name.replace('.reference', '')

    max_bytes = 1 << 20
    output_dir = tempfile.mkdtemp()

    try:
        begin_time = time.time()
        results_dashboard.MakeHistogramSetWithDiagnostics(
            histograms_file=options.results_file,
            test_name=stripped_test_name,
            bot=options.configuration_name,
            buildername=options.buildername,
            buildnumber=options.buildnumber,
            project=options.project,
            buildbucket=options.buildbucket,
            revisions_dict=revisions,
            is_reference_build=is_reference_build,
            perf_dashboard_machine_group=options.perf_dashboard_machine_group,
            output_dir=output_dir,
            max_bytes=max_bytes)
        end_time = time.time()
        logging.info('Duration of adding diagnostics for %s: %d seconds' %
                     (stripped_test_name, end_time - begin_time))

        # Read all batch files from output_dir.
        dashboard_jsons = []
        for basename in os.listdir(output_dir):
            with open(os.path.join(output_dir, basename)) as f:
                dashboard_jsons.append(json.load(f))

        return dashboard_jsons
    finally:
        shutil.rmtree(output_dir)
コード例 #4
0
def _GetDashboardHistogramData(options):
  revisions = {
      '--chromium_commit_positions': _GetMainRevision(options.got_revision_cp),
      '--chromium_revisions': options.git_revision
  }

  if options.got_webrtc_revision:
    revisions['--webrtc_revisions'] = options.got_webrtc_revision
  if options.got_v8_revision:
    revisions['--v8_revisions'] = options.got_v8_revision

  is_reference_build = 'reference' in options.name
  stripped_test_name = options.name.replace('.reference', '')

  # 30 MB max_bytes was chosen to be large enough that we rarely have to break
  # up perf data into chunks since it is slow (crbug.com/947035) but small
  # enough that we don't cause crbug.com/909961.
  max_bytes = 30 << 20
  output_dir = tempfile.mkdtemp()

  try:
    begin_time = time.time()
    results_dashboard.MakeHistogramSetWithDiagnostics(
        histograms_file=options.results_file, test_name=stripped_test_name,
        bot=options.configuration_name, buildername=options.buildername,
        buildnumber=options.buildnumber,
        project=options.project, buildbucket=options.buildbucket,
        revisions_dict=revisions, is_reference_build=is_reference_build,
        perf_dashboard_machine_group=options.perf_dashboard_machine_group,
        output_dir=output_dir,
        max_bytes=max_bytes)
    end_time = time.time()
    print 'Duration of adding diagnostics for %s: %d seconds' % (
        stripped_test_name, end_time - begin_time)

    # Read all batch files from output_dir.
    dashboard_jsons = []
    for basename in os.listdir(output_dir):
      with open(os.path.join(output_dir, basename)) as f:
        dashboard_jsons.append(json.load(f))

    return dashboard_jsons
  finally:
    shutil.rmtree(output_dir)