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

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 Kari's comments 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 # To see all the web APIs that action_runner supports, see:
18 # telemetry.page.action_runner module.
19
20 action_runner.Wait(0.5)
21 # Create interaction record will create a region of interest in tracing that
22 # cover the wait, tap, and scroll actions nested in the block below.
23 with action_runner.CreateInteraction('Scroll-And-Tap'):
24 action_runner.Wait(0.3)
25 action_runner.ScrollPage()
26 action_runner.TapElement(text='Next')
27 action_runner.Wait(1)
28 with action_runner.CreateInteraction('Scroll'):
29 action_runner.ScrollPage()
30 with action_runner.CreateInteraction('Wait-two'):
31 action_runner.Wait(1)
32
33
34 class SimpleStorySet(story.StorySet):
35 def __init__(self):
36 super(SimpleStorySet, self).__init__(
37 archive_data_file='data/simple_story_set.json',
38 cloud_storage_bucket=story.PARTNER_BUCKET)
39 self.AddStory(ExamplePage(self))
OLDNEW
« no previous file with comments | « tools/telemetry/examples/benchmarks/__init__.py ('k') | tools/telemetry/examples/benchmarks/v8_benchmark.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698