Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: tools/perf/page_sets/system_health/system_health_stories.py

Issue 2118293002: Add benchmark that imitates news reading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Order stories, sync with news:load, news:social, update urls Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from page_sets.system_health import platforms
5 from page_sets.system_health import single_page_stories 6 from page_sets.system_health import single_page_stories
6 7
7 from telemetry import story 8 from telemetry import story
8 9
9 10
10 class _SystemHealthStorySet(story.StorySet): 11 class _SystemHealthStorySet(story.StorySet):
11 """User stories for the System Health Plan. 12 """User stories for the System Health Plan.
12 13
13 See https://goo.gl/Jek2NL. 14 See https://goo.gl/Jek2NL.
14 """ 15 """
15 PLATFORM = NotImplemented 16 PLATFORM = NotImplemented
16 17
17 def __init__(self, take_memory_measurement=True): 18 def __init__(self, take_memory_measurement=True):
18 super(_SystemHealthStorySet, self).__init__( 19 super(_SystemHealthStorySet, self).__init__(
19 archive_data_file=('../data/memory_system_health_%s.json' % 20 archive_data_file=('../data/memory_system_health_%s.json' %
20 self.PLATFORM), 21 self.PLATFORM),
21 cloud_storage_bucket=story.PARTNER_BUCKET) 22 cloud_storage_bucket=story.PARTNER_BUCKET)
22 for story_class in single_page_stories.IterAllStoryClasses(): 23 for story_class in single_page_stories.IterAllStoryClasses():
23 if self.PLATFORM not in story_class.SUPPORTED_PLATFORMS: 24 if self.PLATFORM not in story_class.SUPPORTED_PLATFORMS:
24 continue 25 continue
25 self.AddStory(story_class(self, take_memory_measurement)) 26 self.AddStory(story_class(self, take_memory_measurement))
26 27
27 28
28 class DesktopSystemHealthStorySet(_SystemHealthStorySet): 29 class DesktopSystemHealthStorySet(_SystemHealthStorySet):
29 """Desktop user stories for Chrome System Health Plan.""" 30 """Desktop user stories for Chrome System Health Plan."""
30 PLATFORM = 'desktop' 31 PLATFORM = platforms.DESKTOP
31 32
32 33
33 class MobileSystemHealthStorySet(_SystemHealthStorySet): 34 class MobileSystemHealthStorySet(_SystemHealthStorySet):
34 """Mobile user stories for Chrome System Health Plan.""" 35 """Mobile user stories for Chrome System Health Plan."""
35 PLATFORM = 'mobile' 36 PLATFORM = platforms.MOBILE
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698