| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 core import perf_benchmark | 5 from core import perf_benchmark |
| 6 | 6 |
| 7 from measurements import session_restore | 7 from measurements import session_restore |
| 8 from profile_creators import profile_generator | 8 from profile_creators import profile_generator |
| 9 from profile_creators import small_profile_extender | 9 from profile_creators import small_profile_extender |
| 10 from telemetry import benchmark | 10 from telemetry import benchmark |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 """ | 54 """ |
| 55 story_set = self.page_set() | 55 story_set = self.page_set() |
| 56 for user_story in story_set.user_stories[1:]: | 56 for user_story in story_set.user_stories[1:]: |
| 57 story_set.RemoveUserStory(user_story) | 57 story_set.RemoveUserStory(user_story) |
| 58 return story_set | 58 return story_set |
| 59 | 59 |
| 60 def CreatePageTest(self, options): | 60 def CreatePageTest(self, options): |
| 61 is_cold = (self.tag == 'cold') | 61 is_cold = (self.tag == 'cold') |
| 62 return session_restore.SessionRestore(cold=is_cold) | 62 return session_restore.SessionRestore(cold=is_cold) |
| 63 | 63 |
| 64 def CreateStorySet(self, options): | 64 def CreatePageSet(self, options): |
| 65 return page_sets.Typical25PageSet(run_no_page_interactions=True) | 65 return page_sets.Typical25PageSet(run_no_page_interactions=True) |
| 66 | 66 |
| 67 # crbug.com/325479, crbug.com/381990 | 67 # crbug.com/325479, crbug.com/381990 |
| 68 @benchmark.Disabled('android', 'linux', 'reference') | 68 @benchmark.Disabled('android', 'linux', 'reference') |
| 69 class SessionRestoreColdTypical25(_SessionRestoreTypical25): | 69 class SessionRestoreColdTypical25(_SessionRestoreTypical25): |
| 70 """Test by clearing system cache and profile before repeats.""" | 70 """Test by clearing system cache and profile before repeats.""" |
| 71 tag = 'cold' | 71 tag = 'cold' |
| 72 options = {'pageset_repeat': 5} | 72 options = {'pageset_repeat': 5} |
| 73 | 73 |
| 74 @classmethod | 74 @classmethod |
| 75 def Name(cls): | 75 def Name(cls): |
| 76 return 'session_restore.cold.typical_25' | 76 return 'session_restore.cold.typical_25' |
| 77 | 77 |
| 78 | 78 |
| 79 # crbug.com/325479, crbug.com/381990 | 79 # crbug.com/325479, crbug.com/381990 |
| 80 @benchmark.Disabled('android', 'linux', 'reference', 'xp') | 80 @benchmark.Disabled('android', 'linux', 'reference', 'xp') |
| 81 class SessionRestoreWarmTypical25(_SessionRestoreTypical25): | 81 class SessionRestoreWarmTypical25(_SessionRestoreTypical25): |
| 82 """Test without clearing system cache or profile before repeats. | 82 """Test without clearing system cache or profile before repeats. |
| 83 | 83 |
| 84 The first result is discarded. | 84 The first result is discarded. |
| 85 """ | 85 """ |
| 86 tag = 'warm' | 86 tag = 'warm' |
| 87 options = {'pageset_repeat': 20} | 87 options = {'pageset_repeat': 20} |
| 88 | 88 |
| 89 @classmethod | 89 @classmethod |
| 90 def Name(cls): | 90 def Name(cls): |
| 91 return 'session_restore.warm.typical_25' | 91 return 'session_restore.warm.typical_25' |
| 92 | 92 |
| OLD | NEW |