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

Side by Side Diff: tools/perf/page_sets/blob_workshop.py

Issue 1198823004: Update perf page_set to use story_set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 2015 The Chromium Authors. All rights reserved. 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 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 telemetry import story
5 from telemetry.page import page as page_module 6 from telemetry.page import page as page_module
6 from telemetry.page import page_test as page_test 7 from telemetry.page import page_test as page_test
7 from telemetry.page import page_set as page_set_module
8
9 8
10 NUM_BLOB_MASS_CREATE_READS = 15 9 NUM_BLOB_MASS_CREATE_READS = 15
11 10
12 11
13 class BlobCreateThenRead(page_module.Page): 12 class BlobCreateThenRead(page_module.Page):
14 13
15 def __init__(self, write_method, blob_sizes, page_set): 14 def __init__(self, write_method, blob_sizes, page_set):
16 super(BlobCreateThenRead, self).__init__( 15 super(BlobCreateThenRead, self).__init__(
17 url='file://blob/blob-workshop.html', 16 url='file://blob/blob-workshop.html',
18 page_set=page_set, 17 page_set=page_set,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 repeatable=True): 57 repeatable=True):
59 action_runner.ExecuteJavaScript('readBlobsSerially();') 58 action_runner.ExecuteJavaScript('readBlobsSerially();')
60 action_runner.WaitForJavaScriptCondition( 59 action_runner.WaitForJavaScriptCondition(
61 'doneReading === true || errors', 60) 60 'doneReading === true || errors', 60)
62 61
63 errors = action_runner.EvaluateJavaScript('errors') 62 errors = action_runner.EvaluateJavaScript('errors')
64 if errors: 63 if errors:
65 raise page_test.Failure('Errors on page: ' + ', '.join(self.errors)) 64 raise page_test.Failure('Errors on page: ' + ', '.join(self.errors))
66 65
67 66
68 class BlobWorkshopPageSet(page_set_module.PageSet): 67 class BlobWorkshopPageSet(story.StorySet):
69 """The BlobWorkshop page set.""" 68 """The BlobWorkshop page set."""
70 69
71 def __init__(self): 70 def __init__(self):
72 super(BlobWorkshopPageSet, self).__init__() 71 super(BlobWorkshopPageSet, self).__init__()
73 self.AddUserStory( 72 self.AddUserStory(
74 BlobMassCreate('2Bx200', [2] * 200, self)) 73 BlobMassCreate('2Bx200', [2] * 200, self))
75 self.AddUserStory( 74 self.AddUserStory(
76 BlobMassCreate('1KBx200', [1024] * 200, self)) 75 BlobMassCreate('1KBx200', [1024] * 200, self))
77 self.AddUserStory( 76 self.AddUserStory(
78 BlobMassCreate('150KBx200', [150 * 1024] * 200, self)) 77 BlobMassCreate('150KBx200', [150 * 1024] * 200, self))
79 self.AddUserStory( 78 self.AddUserStory(
80 BlobMassCreate('1MBx200', [1024 * 1024] * 200, self)) 79 BlobMassCreate('1MBx200', [1024 * 1024] * 200, self))
81 self.AddUserStory( 80 self.AddUserStory(
82 BlobMassCreate('10MBx30', [10 * 1024 * 1024] * 30, self)) 81 BlobMassCreate('10MBx30', [10 * 1024 * 1024] * 30, self))
83 self.AddUserStory( 82 self.AddUserStory(
84 BlobMassCreate('100MBx5', [100 * 1024 * 1024] * 5, self)) 83 BlobMassCreate('100MBx5', [100 * 1024 * 1024] * 5, self))
85 84
86 self.AddUserStory(BlobCreateThenRead('2Bx200', [2] * 200, self)) 85 self.AddUserStory(BlobCreateThenRead('2Bx200', [2] * 200, self))
87 self.AddUserStory(BlobCreateThenRead('1KBx200', [1024] * 200, self)) 86 self.AddUserStory(BlobCreateThenRead('1KBx200', [1024] * 200, self))
88 self.AddUserStory( 87 self.AddUserStory(
89 BlobCreateThenRead('150KBx200', [150 * 1024 - 1] * 200, self)) 88 BlobCreateThenRead('150KBx200', [150 * 1024 - 1] * 200, self))
90 self.AddUserStory(BlobCreateThenRead('1MBx200', [1024 * 1024] * 200, self)) 89 self.AddUserStory(BlobCreateThenRead('1MBx200', [1024 * 1024] * 200, self))
91 self.AddUserStory( 90 self.AddUserStory(
92 BlobCreateThenRead('10MBx30', [10 * 1024 * 1024] * 30, self)) 91 BlobCreateThenRead('10MBx30', [10 * 1024 * 1024] * 30, self))
93 self.AddUserStory( 92 self.AddUserStory(
94 BlobCreateThenRead('100MBx5', [100 * 1024 * 1024] * 5, self)) 93 BlobCreateThenRead('100MBx5', [100 * 1024 * 1024] * 5, self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/blank_page_with_large_profile.py ('k') | tools/perf/page_sets/chrome_signin.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698