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

Side by Side Diff: tools/telemetry/examples/benchmarks/simple_story_set.py

Issue 1368533002: [Telemetry] Add an example for adding an end to end Telemetry benchmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Ethan comment message_loop -> v8 change Created 5 years, 1 month 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
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from telemetry import story
6 from telemetry import page
7
8
9 class ExamplePage(page.Page):
10
11 def __init__(self, page_set):
12 super(ExamplePage, self).__init__(
13 url='https://google.com/search?q=lemon',
14 page_set=page_set)
15
16 def RunPageInteractions(self, action_runner):
17 action_runner.Wait(0.5)
aiolos (Not reviewing) 2015/11/06 18:15:21 It might be worthwhile to add a comment about Crea
nednguyen 2015/11/06 18:36:15 Done.
18 with action_runner.CreateInteraction('Wait'):
19 action_runner.Wait(0.3)
20 action_runner.Wait(0.1)
21 with action_runner.CreateInteraction('Scroll'):
22 # To see all the web APIs that action_runner supports, see:
aiolos (Not reviewing) 2015/11/06 18:15:21 This seems like an odd place for this comment. Can
nednguyen 2015/11/06 18:36:15 Done.
23 # telemetry.page.action_runner module.
24 action_runner.ScrollPage()
25 with action_runner.CreateInteraction('Wait-two'):
26 action_runner.Wait(1)
27
28
29 class SimpleStorySet(story.StorySet):
30 def __init__(self):
31 super(SimpleStorySet, self).__init__(
32 archive_data_file='data/simple_story_set.json',
33 cloud_storage_bucket=story.PARTNER_BUCKET)
34 self.AddStory(ExamplePage(self))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698