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

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

Issue 2308593002: Revert of Temporarily decrease min-idle time for todomvc pagesets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
« no previous file with comments | « tools/perf/benchmarks/v8.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 telemetry.page import page as page_module 5 from telemetry.page import page as page_module
6 from telemetry.page import shared_page_state 6 from telemetry.page import shared_page_state
7 from telemetry import story 7 from telemetry import story
8 8
9 9
10 URL_LIST = [ 10 URL_LIST = [
(...skipping 23 matching lines...) Expand all
34 self.script_to_evaluate_on_commit = ( 34 self.script_to_evaluate_on_commit = (
35 'console.time("%s");' % INTERACTION_NAME) 35 'console.time("%s");' % INTERACTION_NAME)
36 36
37 def RunPageInteractions(self, action_runner): 37 def RunPageInteractions(self, action_runner):
38 action_runner.ExecuteJavaScript( 38 action_runner.ExecuteJavaScript(
39 """ 39 """
40 this.becameIdle = false; 40 this.becameIdle = false;
41 this.idleCallback = function(deadline) { 41 this.idleCallback = function(deadline) {
42 let idletime = deadline.timeRemaining(); 42 let idletime = deadline.timeRemaining();
43 console.time("time remaining: " + idletime); 43 console.time("time remaining: " + idletime);
44 if (idletime > 10) 44 if (idletime > 20)
45 this.becameIdle = true; 45 this.becameIdle = true;
46 else 46 else
47 requestIdleCallback(this.idleCallback); 47 requestIdleCallback(this.idleCallback);
48 console.timeEnd("time remaining: " + idletime); 48 console.timeEnd("time remaining: " + idletime);
49 }; 49 };
50 requestIdleCallback(this.idleCallback); 50 requestIdleCallback(this.idleCallback);
51 """ 51 """
52 ) 52 )
53 action_runner.WaitForJavaScriptCondition('this.becameIdle === true') 53 action_runner.WaitForJavaScriptCondition('this.becameIdle === true')
54 action_runner.ExecuteJavaScript('console.timeEnd("%s");' % INTERACTION_NAME) 54 action_runner.ExecuteJavaScript('console.timeEnd("%s");' % INTERACTION_NAME)
55 55
56 56
57 class TodoMVCPageSet(story.StorySet): 57 class TodoMVCPageSet(story.StorySet):
58 58
59 """ TodoMVC examples """ 59 """ TodoMVC examples """
60 60
61 def __init__(self): 61 def __init__(self):
62 super(TodoMVCPageSet, self).__init__( 62 super(TodoMVCPageSet, self).__init__(
63 archive_data_file='data/todomvc.json', 63 archive_data_file='data/todomvc.json',
64 cloud_storage_bucket=story.PUBLIC_BUCKET) 64 cloud_storage_bucket=story.PUBLIC_BUCKET)
65 65
66 for name, url in URL_LIST: 66 for name, url in URL_LIST:
67 self.AddStory(TodoMVCPage(url, self, name)) 67 self.AddStory(TodoMVCPage(url, self, name))
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/v8.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698