Commit fc17d782 authored by Caleb Rouleau's avatar Caleb Rouleau Committed by Commit Bot

[Benchmarking] Use shard index for filtering stories for benchmark_smoke_unittest.

Before, we did direct story_set manipulation. This is a bad pattern however
per crbug.com/980758 and we would prefer to delete that functionality.

Note that
this problem could have been solved instead by passing
--run-full-story-set into options_for_unittests, but then we would not
be removing the usage of RemoveStory, and we would not be running the
abridged stories as the smoke tests.

Bug: 980758, 965158
Change-Id: I027783d0920409df2d645b7fe8f6c26392aee3fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874821Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Commit-Queue: Caleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709239}
parent 52272c06
......@@ -65,12 +65,6 @@ def SmokeTestGenerator(benchmark, num_pages=1):
# values, and does not take histograms into account. An alternative
# should be implemented when using the results processor.
type(self).MAX_NUM_VALUES = MAX_NUM_VALUES / len(story_set)
# Only smoke test the first story since smoke testing everything takes
# too long.
for s in story_set.stories[num_pages:]:
story_set.RemoveStory(s)
return story_set
# Some benchmarks are running multiple iterations
......@@ -83,6 +77,9 @@ def SmokeTestGenerator(benchmark, num_pages=1):
options = options_for_unittests.GetRunOptions(
output_dir=temp_dir,
benchmark_cls=SinglePageBenchmark,
# Only smoke test num_pages since smoke testing everything takes
# too long.
overrides={'story_shard_end_index': num_pages},
environment=chromium_config.GetDefaultChromiumConfig())
options.pageset_repeat = 1 # For smoke testing only run the page once.
single_page_benchmark = SinglePageBenchmark()
......
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