Commit 64909359 authored by Ned Nguyen's avatar Ned Nguyen Committed by Commit Bot

Update perf_data_generator to also generate benchmark tags into tools/perf/benchmark.csv

This CL also refactors the method to generate the story set from benchmark into
tools/perf/core/benchmark_utils.py for better code sharing

Bug:874940
Cq-Include-Trybots: master.tryserver.chromium.perf:obbs_fyi
Change-Id: I2a551840fd852162a4743eac769d92c6ee499bc4

NOTRY=true  # all tests passed in patch set 3

Change-Id: I2a551840fd852162a4743eac769d92c6ee499bc4
Reviewed-on: https://chromium-review.googlesource.com/1179603
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584081}
parent 57366e25
AUTOGENERATED FILE DO NOT EDIT AUTOGENERATED FILE DO NOT EDIT
See //tools/perf/generate_perf_data.py to make changes See //tools/perf/generate_perf_data.py to make changes
Benchmark name,Individual owners,Component,Documentation Benchmark name,Individual owners,Component,Documentation,Tags
angle_perftests,"jmadill@chromium.org, chrome-gpu-perf-owners@chromium.org",Internals>GPU>ANGLE, angle_perftests,"jmadill@chromium.org, chrome-gpu-perf-owners@chromium.org",Internals>GPU>ANGLE,,
blink_perf.bindings,"jbroman@chromium.org, yukishiino@chromium.org, haraken@chromium.org",,https://bit.ly/blink-perf-benchmarks blink_perf.bindings,"jbroman@chromium.org, yukishiino@chromium.org, haraken@chromium.org",,https://bit.ly/blink-perf-benchmarks,
blink_perf.canvas,fserb@chromium.org,,https://bit.ly/blink-perf-benchmarks blink_perf.canvas,fserb@chromium.org,,https://bit.ly/blink-perf-benchmarks,
blink_perf.css,futhark@chromium.org,,https://bit.ly/blink-perf-benchmarks blink_perf.css,futhark@chromium.org,,https://bit.ly/blink-perf-benchmarks,
blink_perf.dom,"jbroman@chromium.org, yukishiino@chromium.org, haraken@chromium.org",,https://bit.ly/blink-perf-benchmarks blink_perf.dom,"jbroman@chromium.org, yukishiino@chromium.org, haraken@chromium.org",,https://bit.ly/blink-perf-benchmarks,
blink_perf.events,hayato@chromium.org,,https://bit.ly/blink-perf-benchmarks blink_perf.events,hayato@chromium.org,,https://bit.ly/blink-perf-benchmarks,
blink_perf.image_decoder,cblume@chromium.org,,https://bit.ly/blink-perf-benchmarks blink_perf.image_decoder,cblume@chromium.org,,https://bit.ly/blink-perf-benchmarks,
blink_perf.layout,eae@chromium.org,,https://bit.ly/blink-perf-benchmarks blink_perf.layout,eae@chromium.org,,https://bit.ly/blink-perf-benchmarks,
blink_perf.owp_storage,dmurph@chromium.org,,https://bit.ly/blink-perf-benchmarks blink_perf.owp_storage,dmurph@chromium.org,,https://bit.ly/blink-perf-benchmarks,
blink_perf.paint,wangxianzhu@chromium.org,,https://bit.ly/blink-perf-benchmarks blink_perf.paint,wangxianzhu@chromium.org,,https://bit.ly/blink-perf-benchmarks,
blink_perf.parser,"jbroman@chromium.org, yukishiino@chromium.org, haraken@chromium.org",,https://bit.ly/blink-perf-benchmarks blink_perf.parser,"jbroman@chromium.org, yukishiino@chromium.org, haraken@chromium.org",,https://bit.ly/blink-perf-benchmarks,
blink_perf.shadow_dom,hayato@chromium.org,,https://bit.ly/blink-perf-benchmarks blink_perf.shadow_dom,hayato@chromium.org,,https://bit.ly/blink-perf-benchmarks,
blink_perf.svg,"kouhei@chromium.org, fs@opera.com",,https://bit.ly/blink-perf-benchmarks blink_perf.svg,"kouhei@chromium.org, fs@opera.com",,https://bit.ly/blink-perf-benchmarks,
components_perftests,csharrison@chromium.org,, components_perftests,csharrison@chromium.org,,,
dromaeo,"jbroman@chromium.org, yukishiino@chromium.org, haraken@chromium.org",, dromaeo,"jbroman@chromium.org, yukishiino@chromium.org, haraken@chromium.org",,,
dummy_benchmark.histogram_benchmark_1,"eakuefner@chromium.org, simonhatch@chromium.org",, dummy_benchmark.histogram_benchmark_1,"eakuefner@chromium.org, simonhatch@chromium.org",,,
dummy_benchmark.noisy_benchmark_1,nednguyen@google.com,, dummy_benchmark.noisy_benchmark_1,nednguyen@google.com,,,
dummy_benchmark.stable_benchmark_1,nednguyen@google.com,, dummy_benchmark.stable_benchmark_1,nednguyen@google.com,,,
gpu_perftests,"reveman@chromium.org, chrome-gpu-perf-owners@chromium.org",Internals>GPU, gpu_perftests,"reveman@chromium.org, chrome-gpu-perf-owners@chromium.org",Internals>GPU,,
jetstream,hablich@chromium.org,, jetstream,hablich@chromium.org,,,
kraken,hablich@chromium.org,, kraken,hablich@chromium.org,,,
load_library_perf_tests,"xhwang@chromium.org, crouleau@chromium.org",Internals>Media>Encrypted, load_library_perf_tests,"xhwang@chromium.org, crouleau@chromium.org",Internals>Media>Encrypted,,
loading.desktop,"kouhei@chromium.org, ksakamoto@chromium.org",,https://bit.ly/loading-benchmarks loading.desktop,"kouhei@chromium.org, ksakamoto@chromium.org",,https://bit.ly/loading-benchmarks,"cache_temperature_cold,cache_temperature_warm,international,intl_ar_fa_he,intl_es_fr_pt_BR,intl_hi_ru,intl_ja_zh,intl_ko_th_vi,typical"
loading.mobile,"kouhei@chromium.org, ksakamoto@chromium.org",,https://bit.ly/loading-benchmarks loading.mobile,"kouhei@chromium.org, ksakamoto@chromium.org",,https://bit.ly/loading-benchmarks,"cache_temperature_cold,cache_temperature_hot,cache_temperature_warm,easy_ttfmp,easy_tti,global,pwa,tough_ttfmp,tough_tti"
media.desktop,"johnchen@chromium.org, crouleau@chromium.org",Internals>Media, media.desktop,"johnchen@chromium.org, crouleau@chromium.org",Internals>Media,,"aac,audio_only,audio_video,background,beginning_to_end,busyjs,cns,h264,is_4k,is_50fps,mp3,mse,opus,pcm,seek,src,video_only,vorbis,vp8,vp9"
media.mobile,"johnchen@chromium.org, crouleau@chromium.org",Internals>Media, media.mobile,"johnchen@chromium.org, crouleau@chromium.org",Internals>Media,,"aac,audio_only,audio_video,background,beginning_to_end,busyjs,cns,h264,is_4k,is_50fps,mp3,mse,opus,pcm,seek,src,video_only,vorbis,vp8,vp9"
media_perftests,crouleau@chromium.org,, media_perftests,crouleau@chromium.org,,,
memory.desktop,erikchen@chromium.org,, memory.desktop,erikchen@chromium.org,,,
memory.long_running_idle_gmail_background_tbmv2,ulan@chromium.org,, memory.long_running_idle_gmail_background_tbmv2,ulan@chromium.org,,,
memory.long_running_idle_gmail_tbmv2,ulan@chromium.org,, memory.long_running_idle_gmail_tbmv2,ulan@chromium.org,,,
memory.top_10_mobile,perezju@chromium.org,, memory.top_10_mobile,perezju@chromium.org,,,
net_perftests,xunjieli@chromium.org,, net_perftests,xunjieli@chromium.org,,,
octane,hablich@chromium.org,, octane,hablich@chromium.org,,,
oortonline_tbmv2,ulan@chromium.org,, oortonline_tbmv2,ulan@chromium.org,,,
passthrough_command_buffer_perftests,"piman@chromium.org, chrome-gpu-perf-owners@chromium.org",Internals>GPU>ANGLE, passthrough_command_buffer_perftests,"piman@chromium.org, chrome-gpu-perf-owners@chromium.org",Internals>GPU>ANGLE,,
performance_browser_tests,miu@chromium.org,, performance_browser_tests,miu@chromium.org,,,
power.desktop,brucedawson@chromium.org,,https://bit.ly/power-benchmarks power.desktop,brucedawson@chromium.org,,https://bit.ly/power-benchmarks,
power.typical_10_mobile,perezju@chromium.org,,https://bit.ly/power-benchmarks power.typical_10_mobile,perezju@chromium.org,,https://bit.ly/power-benchmarks,
rasterize_and_record_micro.partial_invalidation,"vmpstr@chromium.org, wkorman@chromium.org",Internals>Compositing>Rasterization, rasterize_and_record_micro.partial_invalidation,"vmpstr@chromium.org, wkorman@chromium.org",Internals>Compositing>Rasterization,,
rasterize_and_record_micro.top_25,"vmpstr@chromium.org, wkorman@chromium.org",Internals>Compositing>Rasterization, rasterize_and_record_micro.top_25,"vmpstr@chromium.org, wkorman@chromium.org",Internals>Compositing>Rasterization,,
rendering.desktop,"sadrul@chromium.org, vmiura@chromium.org",,https://bit.ly/rendering-benchmarks rendering.desktop,"sadrul@chromium.org, vmiura@chromium.org",,https://bit.ly/rendering-benchmarks,"gpu_rasterization,image_decoding,key_desktop_move,maps,required_webgl,top_real_world_desktop,tough_animation,tough_canvas,tough_compositor,tough_filters,tough_image_decode,tough_path_rendering,tough_pinch_zoom,tough_scheduling,tough_scrolling,tough_texture_upload,tough_webgl,use_fake_camera_device"
rendering.mobile,"sadrul@chromium.org, vmiura@chromium.org",,https://bit.ly/rendering-benchmarks rendering.mobile,"sadrul@chromium.org, vmiura@chromium.org",,https://bit.ly/rendering-benchmarks,"fastpath,gpu_rasterization,image_decoding,key_hit_test,key_idle_power,key_noop,key_silk,maps,pathological_mobile_sites,polymer,required_webgl,simple_mobile_sites,sync_scroll,top_real_world_desktop,top_real_world_mobile,tough_animation,tough_canvas,tough_compositor,tough_filters,tough_image_decode,tough_path_rendering,tough_scheduling,tough_scrolling,tough_texture_upload,tough_webgl,use_fake_camera_device"
resource_sizes,"agrieve@chromium.org, rnephew@chromium.org, perezju@chromium.org",, resource_sizes,"agrieve@chromium.org, rnephew@chromium.org, perezju@chromium.org",,,
sizes (linux),thestig@chromium.org,, sizes (linux),thestig@chromium.org,,,
sizes (mac),tapted@chromium.org,, sizes (mac),tapted@chromium.org,,,
sizes (win),grt@chromium.org,, sizes (win),grt@chromium.org,,,
smoothness.gpu_rasterization.tough_pinch_zoom_cases,ericrk@chromium.org,, smoothness.gpu_rasterization.tough_pinch_zoom_cases,ericrk@chromium.org,,,"gpu_rasterization,tough_pinch_zoom"
smoothness.tough_pinch_zoom_cases,bokan@chromium.org,, smoothness.tough_pinch_zoom_cases,bokan@chromium.org,,,"gpu_rasterization,tough_pinch_zoom"
speedometer,hablich@chromium.org,, speedometer,hablich@chromium.org,,,
speedometer-future,hablich@chromium.org,, speedometer-future,hablich@chromium.org,,,
speedometer2,hablich@chromium.org,, speedometer2,hablich@chromium.org,,,
speedometer2-future,hablich@chromium.org,, speedometer2-future,hablich@chromium.org,,,
start_with_url.cold.startup_pages,"pasko@chromium.org, chrome-android-perf-status@chromium.org",, start_with_url.cold.startup_pages,"pasko@chromium.org, chrome-android-perf-status@chromium.org",,,
start_with_url.warm.startup_pages,"pasko@chromium.org, chrome-android-perf-status@chromium.org",, start_with_url.warm.startup_pages,"pasko@chromium.org, chrome-android-perf-status@chromium.org",,,
supersize_archive,agrieve@chromium.org,, supersize_archive,agrieve@chromium.org,,,
system_health.common_desktop,"charliea@chromium.org, sullivan@chromium.org, tdresser@chromium.org, chrome-speed-metrics-dev@chromium.org",Speed>Metrics>SystemHealthRegressions,https://bit.ly/system-health-benchmarks system_health.common_desktop,"charliea@chromium.org, sullivan@chromium.org, tdresser@chromium.org, chrome-speed-metrics-dev@chromium.org",Speed>Metrics>SystemHealthRegressions,https://bit.ly/system-health-benchmarks,"accessibility,emerging_market,health_check,infinite_scroll,international,javascript_heavy,scroll,tabs_switching,webgl"
system_health.common_mobile,"charliea@chromium.org, sullivan@chromium.org, tdresser@chromium.org, perezju@chromium.org, chrome-speed-metrics-dev@chromium.org",Speed>Metrics>SystemHealthRegressions,https://bit.ly/system-health-benchmarks system_health.common_mobile,"charliea@chromium.org, sullivan@chromium.org, tdresser@chromium.org, perezju@chromium.org, chrome-speed-metrics-dev@chromium.org",Speed>Metrics>SystemHealthRegressions,https://bit.ly/system-health-benchmarks,"emerging_market,health_check,infinite_scroll,international,javascript_heavy"
system_health.memory_desktop,perezju@chromium.org,,https://bit.ly/system-health-benchmarks system_health.memory_desktop,perezju@chromium.org,,https://bit.ly/system-health-benchmarks,"accessibility,emerging_market,health_check,infinite_scroll,international,javascript_heavy,scroll,tabs_switching,webgl"
system_health.memory_mobile,perezju@chromium.org,,https://bit.ly/system-health-benchmarks system_health.memory_mobile,perezju@chromium.org,,https://bit.ly/system-health-benchmarks,"emerging_market,health_check,infinite_scroll,international,javascript_heavy"
system_health.webview_startup,"perezju@chromium.org, torne@chromium.org, changwan@chromium.org",Mobile>WebView>Perf, system_health.webview_startup,"perezju@chromium.org, torne@chromium.org, changwan@chromium.org",Mobile>WebView>Perf,,health_check
tab_switching.typical_25,vovoy@chromium.org,OS>Performance, tab_switching.typical_25,vovoy@chromium.org,OS>Performance,,tabs_switching
tracing.tracing_with_background_memory_infra,ssid@chromium.org,, tracing.tracing_with_background_memory_infra,ssid@chromium.org,,,
tracing_perftests,"kkraynov@chromium.org, primiano@chromium.org",, tracing_perftests,"kkraynov@chromium.org, primiano@chromium.org",,,
v8.browsing_desktop,"mythria@chromium.org, ulan@chromium.org",, v8.browsing_desktop,"mythria@chromium.org, ulan@chromium.org",,,"health_check,infinite_scroll,international,javascript_heavy,webgl"
v8.browsing_desktop-future,"mythria@chromium.org, ulan@chromium.org",, v8.browsing_desktop-future,"mythria@chromium.org, ulan@chromium.org",,,"health_check,infinite_scroll,international,javascript_heavy,webgl"
v8.browsing_mobile,"mythria@chromium.org, ulan@chromium.org",, v8.browsing_mobile,"mythria@chromium.org, ulan@chromium.org",,,"emerging_market,health_check,infinite_scroll,international,javascript_heavy"
v8.browsing_mobile-future,"mythria@chromium.org, ulan@chromium.org",, v8.browsing_mobile-future,"mythria@chromium.org, ulan@chromium.org",,,"emerging_market,health_check,infinite_scroll,international,javascript_heavy"
v8.runtime_stats.top_25,cbruni@chromium.org,, v8.runtime_stats.top_25,cbruni@chromium.org,,,"cold,hot,warm"
validating_command_buffer_perftests,"piman@chromium.org, chrome-gpu-perf-owners@chromium.org",Internals>GPU, validating_command_buffer_perftests,"piman@chromium.org, chrome-gpu-perf-owners@chromium.org",Internals>GPU,,
views_perftests,tapted@chromium.org,Internals>Views, views_perftests,tapted@chromium.org,Internals>Views,,
wasm,bradnelson@chromium.org,, wasm,bradnelson@chromium.org,,,
webrtc,"qiangchen@chromium.org, ehmaldonado@chromium.org, phoglund@chromium.org",,http://bit.ly/webrtc-benchmark webrtc,"qiangchen@chromium.org, ehmaldonado@chromium.org, phoglund@chromium.org",,http://bit.ly/webrtc-benchmark,"datachannel,getusermedia,pauseplay,smoothness,stress,videoConstraints"
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import optparse
from telemetry import benchmark as b_module
from telemetry.internal.browser import browser_options
def GetBenchmarkStorySet(benchmark):
if not isinstance(benchmark, b_module.Benchmark):
raise ValueError(
'|benchmark| must be an instace of telemetry.benchmark.Benchmark class. '
'Instead found object of type: %s' % type(benchmark))
options = browser_options.BrowserFinderOptions()
# Add default values for any extra commandline options
# provided by the benchmark.
parser = optparse.OptionParser()
before, _ = parser.parse_args([])
benchmark.AddBenchmarkCommandLineArgs(parser)
after, _ = parser.parse_args([])
for extra_option in dir(after):
if extra_option not in dir(before):
setattr(options, extra_option, getattr(after, extra_option))
return benchmark.CreateStorySet(options)
def GetBenchmarkStoryNames(benchmark):
story_list = []
for story in GetBenchmarkStorySet(benchmark):
if story.name not in story_list:
story_list.append(story.name)
return sorted(story_list)
def GetStoryTags(benchmark):
tags = set()
for story in GetBenchmarkStorySet(benchmark):
tags.update(story.tags)
return sorted(list(tags))
...@@ -22,7 +22,7 @@ import sys ...@@ -22,7 +22,7 @@ import sys
import sets import sets
import tempfile import tempfile
from core import benchmark_utils
from core import bot_platforms from core import bot_platforms
from core import path_util from core import path_util
from core import undocumented_benchmarks as ub_module from core import undocumented_benchmarks as ub_module
...@@ -627,53 +627,57 @@ def update_all_tests(waterfall, file_path): ...@@ -627,53 +627,57 @@ def update_all_tests(waterfall, file_path):
get_all_waterfall_benchmarks_metadata()) get_all_waterfall_benchmarks_metadata())
# not_scheduled means this test is not scheduled on any of the chromium.perf class BenchmarkMetadata(object):
# waterfalls. Right now, all the below benchmarks are scheduled, but some other def __init__(self, emails, component='', documentation_url='', tags='',
# benchmarks are not scheduled, because they're disabled on all platforms. not_scheduled=False):
BenchmarkMetadata = collections.namedtuple( self.emails = emails
'BenchmarkMetadata', 'emails component documentation_url not_scheduled') self.component = component
self.documentation_url = documentation_url
self.tags = tags
# not_scheduled means this test is not scheduled on any of the chromium.perf
# waterfalls. Right now, all the below benchmarks are scheduled, but some
# other benchmarks are not scheduled, because they're disabled on all
# platforms.
# TODO(crbug.com/875232): remove this field
self.not_scheduled = not_scheduled
NON_TELEMETRY_BENCHMARKS = { NON_TELEMETRY_BENCHMARKS = {
'angle_perftests': BenchmarkMetadata( 'angle_perftests': BenchmarkMetadata(
'jmadill@chromium.org, chrome-gpu-perf-owners@chromium.org', 'jmadill@chromium.org, chrome-gpu-perf-owners@chromium.org',
'Internals>GPU>ANGLE', None, False), 'Internals>GPU>ANGLE'),
'validating_command_buffer_perftests': BenchmarkMetadata( 'validating_command_buffer_perftests': BenchmarkMetadata(
'piman@chromium.org, chrome-gpu-perf-owners@chromium.org', 'piman@chromium.org, chrome-gpu-perf-owners@chromium.org',
'Internals>GPU', None, False), 'Internals>GPU'),
'passthrough_command_buffer_perftests': BenchmarkMetadata( 'passthrough_command_buffer_perftests': BenchmarkMetadata(
'piman@chromium.org, chrome-gpu-perf-owners@chromium.org', 'piman@chromium.org, chrome-gpu-perf-owners@chromium.org',
'Internals>GPU>ANGLE', None, False), 'Internals>GPU>ANGLE'),
'net_perftests': BenchmarkMetadata( 'net_perftests': BenchmarkMetadata(
'xunjieli@chromium.org', None, None, False), 'xunjieli@chromium.org'),
'gpu_perftests': BenchmarkMetadata( 'gpu_perftests': BenchmarkMetadata(
'reveman@chromium.org, chrome-gpu-perf-owners@chromium.org', 'reveman@chromium.org, chrome-gpu-perf-owners@chromium.org',
'Internals>GPU', None, False), 'Internals>GPU'),
'tracing_perftests': BenchmarkMetadata( 'tracing_perftests': BenchmarkMetadata(
'kkraynov@chromium.org, primiano@chromium.org', None, None, False), 'kkraynov@chromium.org, primiano@chromium.org'),
'load_library_perf_tests': BenchmarkMetadata( 'load_library_perf_tests': BenchmarkMetadata(
'xhwang@chromium.org, crouleau@chromium.org', 'xhwang@chromium.org, crouleau@chromium.org',
'Internals>Media>Encrypted', None, False), 'Internals>Media>Encrypted'),
'media_perftests': BenchmarkMetadata( 'media_perftests': BenchmarkMetadata('crouleau@chromium.org'),
'crouleau@chromium.org', None, None, False), 'performance_browser_tests': BenchmarkMetadata('miu@chromium.org'),
'performance_browser_tests': BenchmarkMetadata(
'miu@chromium.org', None, None, False),
'views_perftests': BenchmarkMetadata( 'views_perftests': BenchmarkMetadata(
'tapted@chromium.org', 'Internals>Views', None, False), 'tapted@chromium.org', 'Internals>Views'),
'components_perftests': BenchmarkMetadata( 'components_perftests': BenchmarkMetadata('csharrison@chromium.org')
'csharrison@chromium.org', None, None, False)
} }
# If you change this dictionary, run tools/perf/generate_perf_data # If you change this dictionary, run tools/perf/generate_perf_data
NON_WATERFALL_BENCHMARKS = { NON_WATERFALL_BENCHMARKS = {
'sizes (mac)': BenchmarkMetadata('tapted@chromium.org', None, None, False), 'sizes (mac)':
'sizes (win)': BenchmarkMetadata('grt@chromium.org', None, None, False), BenchmarkMetadata('tapted@chromium.org'),
'sizes (linux)': BenchmarkMetadata( 'sizes (win)': BenchmarkMetadata('grt@chromium.org'),
'thestig@chromium.org', None, None, False), 'sizes (linux)': BenchmarkMetadata('thestig@chromium.org'),
'resource_sizes': BenchmarkMetadata( 'resource_sizes': BenchmarkMetadata(
'agrieve@chromium.org, rnephew@chromium.org, perezju@chromium.org', 'agrieve@chromium.org, rnephew@chromium.org, perezju@chromium.org'),
None, None, False), 'supersize_archive': BenchmarkMetadata('agrieve@chromium.org'),
'supersize_archive': BenchmarkMetadata(
'agrieve@chromium.org', None, None, False),
} }
...@@ -690,9 +694,11 @@ def get_all_benchmarks_metadata(metadata): ...@@ -690,9 +694,11 @@ def get_all_benchmarks_metadata(metadata):
emails = decorators.GetEmails(benchmark) emails = decorators.GetEmails(benchmark)
if emails: if emails:
emails = ', '.join(emails) emails = ', '.join(emails)
tags_set = benchmark_utils.GetStoryTags(benchmark())
metadata[benchmark.Name()] = BenchmarkMetadata( metadata[benchmark.Name()] = BenchmarkMetadata(
emails, decorators.GetComponent(benchmark), emails, decorators.GetComponent(benchmark),
decorators.GetDocumentationLink(benchmark), False) decorators.GetDocumentationLink(benchmark),
','.join(tags_set), False)
return metadata return metadata
# With migration to new recipe tests are now listed in the shard maps # With migration to new recipe tests are now listed in the shard maps
...@@ -780,7 +786,8 @@ def update_benchmark_csv(file_path): ...@@ -780,7 +786,8 @@ def update_benchmark_csv(file_path):
""" """
header_data = [['AUTOGENERATED FILE DO NOT EDIT'], header_data = [['AUTOGENERATED FILE DO NOT EDIT'],
['See //tools/perf/generate_perf_data.py to make changes'], ['See //tools/perf/generate_perf_data.py to make changes'],
['Benchmark name', 'Individual owners', 'Component', 'Documentation'] ['Benchmark name', 'Individual owners', 'Component', 'Documentation',
'Tags']
] ]
csv_data = [] csv_data = []
...@@ -798,6 +805,7 @@ def update_benchmark_csv(file_path): ...@@ -798,6 +805,7 @@ def update_benchmark_csv(file_path):
benchmark_metadata[benchmark_name].emails, benchmark_metadata[benchmark_name].emails,
benchmark_metadata[benchmark_name].component, benchmark_metadata[benchmark_name].component,
benchmark_metadata[benchmark_name].documentation_url, benchmark_metadata[benchmark_name].documentation_url,
benchmark_metadata[benchmark_name].tags,
]) ])
if undocumented_benchmarks != ub_module.UNDOCUMENTED_BENCHMARKS: if undocumented_benchmarks != ub_module.UNDOCUMENTED_BENCHMARKS:
error_message = ( error_message = (
......
...@@ -33,11 +33,11 @@ class PerfDataGeneratorTest(unittest.TestCase): ...@@ -33,11 +33,11 @@ class PerfDataGeneratorTest(unittest.TestCase):
} }
} }
benchmarks = { benchmarks = {
'benchmark_name_1': BenchmarkMetadata('foo@bar.com', None, None, False), 'benchmark_name_1': BenchmarkMetadata('foo@bar.com'),
'benchmark_name_2': 'benchmark_name_2':
BenchmarkMetadata('darth@deathstar', None, None, False), BenchmarkMetadata('darth@deathstar'),
'benchmark_name_3': 'benchmark_name_3':
BenchmarkMetadata('neo@matrix.org', None, None, False) BenchmarkMetadata('neo@matrix.org')
} }
# Mock out content of unowned_benchmarks.txt and sharding map # Mock out content of unowned_benchmarks.txt and sharding map
...@@ -63,8 +63,8 @@ class PerfDataGeneratorTest(unittest.TestCase): ...@@ -63,8 +63,8 @@ class PerfDataGeneratorTest(unittest.TestCase):
} }
} }
benchmarks = { benchmarks = {
'benchmark_name_2': BenchmarkMetadata(None, None, None, False), 'benchmark_name_2': BenchmarkMetadata('baz@foo.com'),
'benchmark_name_3': BenchmarkMetadata(None, None, None, False), 'benchmark_name_3': BenchmarkMetadata('darth@vader.com'),
} }
with self.assertRaises(AssertionError) as context: with self.assertRaises(AssertionError) as context:
...@@ -77,7 +77,7 @@ class PerfDataGeneratorTest(unittest.TestCase): ...@@ -77,7 +77,7 @@ class PerfDataGeneratorTest(unittest.TestCase):
def testVerifyAllTestsInBenchmarkCsvFindsFakeTest(self): def testVerifyAllTestsInBenchmarkCsvFindsFakeTest(self):
tests = {'Random fake test': {}} tests = {'Random fake test': {}}
benchmarks = { benchmarks = {
'benchmark_name_1': BenchmarkMetadata(None, None, None, False) 'benchmark_name_1': BenchmarkMetadata('deathstar@empire.com')
} }
with self.assertRaises(AssertionError) as context: with self.assertRaises(AssertionError) as context:
......
...@@ -4,20 +4,17 @@ ...@@ -4,20 +4,17 @@
# found in the LICENSE file. # found in the LICENSE file.
"""Script to check validity of StoryExpectations.""" """Script to check validity of StoryExpectations."""
import optparse
import argparse import argparse
import json import json
import os import os
from core import benchmark_utils
from core import benchmark_finders from core import benchmark_finders
from core import path_util from core import path_util
path_util.AddTelemetryToPath() path_util.AddTelemetryToPath()
path_util.AddAndroidPylibToPath() path_util.AddAndroidPylibToPath()
from telemetry.internal.browser import browser_options
CLUSTER_TELEMETRY_DIR = os.path.join( CLUSTER_TELEMETRY_DIR = os.path.join(
path_util.GetChromiumSrcDir(), 'tools', 'perf', 'contrib', path_util.GetChromiumSrcDir(), 'tools', 'perf', 'contrib',
'cluster_telemetry') 'cluster_telemetry')
...@@ -33,19 +30,7 @@ def validate_story_names(benchmarks, raw_expectations_data): ...@@ -33,19 +30,7 @@ def validate_story_names(benchmarks, raw_expectations_data):
continue continue
b = benchmark() b = benchmark()
b.AugmentExpectationsWithParser(raw_expectations_data) b.AugmentExpectationsWithParser(raw_expectations_data)
options = browser_options.BrowserFinderOptions() story_set = benchmark_utils.GetBenchmarkStorySet(b)
# Add default values for any extra commandline options
# provided by the benchmark.
parser = optparse.OptionParser()
before, _ = parser.parse_args([])
benchmark.AddBenchmarkCommandLineArgs(parser)
after, _ = parser.parse_args([])
for extra_option in dir(after):
if extra_option not in dir(before):
setattr(options, extra_option, getattr(after, extra_option))
story_set = b.CreateStorySet(options)
failed_stories = b.GetBrokenExpectations(story_set) failed_stories = b.GetBrokenExpectations(story_set)
assert not failed_stories, 'Incorrect story names: %s' % str(failed_stories) assert not failed_stories, 'Incorrect story names: %s' % str(failed_stories)
......
...@@ -12,32 +12,12 @@ devices we shard to. ...@@ -12,32 +12,12 @@ devices we shard to.
Run -h to see available commands. Run -h to see available commands.
""" """
import optparse
import sys import sys
from core import benchmark_utils
from core import sharding_map_generator from core import sharding_map_generator
from core import perf_data_generator from core import perf_data_generator
from telemetry.internal.browser import browser_options
def _get_stories_for_benchmark(b):
story_list = []
benchmark = b()
options = browser_options.BrowserFinderOptions()
# Add default values for any extra commandline options
# provided by the benchmark.
parser = optparse.OptionParser()
before, _ = parser.parse_args([])
benchmark.AddBenchmarkCommandLineArgs(parser)
after, _ = parser.parse_args([])
for extra_option in dir(after):
if extra_option not in dir(before):
setattr(options, extra_option, getattr(after, extra_option))
for story in benchmark.CreateStorySet(options).stories:
if story.name not in story_list:
story_list.append(story.name)
return story_list
def _include_benchmark(name, shorlist): def _include_benchmark(name, shorlist):
...@@ -64,7 +44,7 @@ if __name__ == '__main__': ...@@ -64,7 +44,7 @@ if __name__ == '__main__':
continue continue
benchmarks_data[b.Name()] = { benchmarks_data[b.Name()] = {
'repeat': b().options.get('pageset_repeat', 1), 'repeat': b().options.get('pageset_repeat', 1),
'stories': _get_stories_for_benchmark(b) 'stories': benchmark_utils.GetStoriesForbenchmark(b)
} }
sys.exit(sharding_map_generator.main(options, benchmarks_data)) sys.exit(sharding_map_generator.main(options, benchmarks_data))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment