Chromium Code Reviews| Index: tools/telemetry/examples/benchmarks/simple_story_set.py |
| diff --git a/tools/telemetry/examples/benchmarks/simple_story_set.py b/tools/telemetry/examples/benchmarks/simple_story_set.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e8fbf736d317fe5450d6950ab2568a43b899d966 |
| --- /dev/null |
| +++ b/tools/telemetry/examples/benchmarks/simple_story_set.py |
| @@ -0,0 +1,30 @@ |
| +# Copyright 2015 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. |
| + |
| +from telemetry import story |
| +from telemetry import page |
| + |
| + |
| +class ExamplePage(page.Page): |
| + |
| + def __init__(self, page_set): |
| + super(ExamplePage, self).__init__( |
| + url='https://www.example.com', |
| + page_set=page_set) |
| + |
| + def RunPageInteractions(self, action_runner): |
| + action_runner.Wait(0.5) |
| + with action_runner.CreateInteraction('Wait-One'): |
| + action_runner.Wait(0.3) |
|
eakuefner
2015/10/30 00:14:55
I think it might be good to showcase more of what
nednguyen
2015/10/30 16:29:56
Done.
|
| + action_runner.Wait(0.1) |
| + with action_runner.CreateInteraction('Wait-Two'): |
| + action_runner.Wait(0.3) |
| + |
| + |
| +class SimpleStorySet(story.StorySet): |
| + def __init__(self): |
| + super(SimpleStorySet, self).__init__( |
| + archive_data_file='data/simple_story_set.json', |
| + cloud_storage_bucket=story.PARTNER_BUCKET) |
| + self.AddStory(ExamplePage(self)) |