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

Side by Side Diff: content/test/gpu/gpu_tests/memory.py

Issue 337603005: Rename telemetry.test.Test to telemetry.benchmark.Benchmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | « content/test/gpu/gpu_tests/maps.py ('k') | content/test/gpu/gpu_tests/pixel.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 import memory_expectations 4 import memory_expectations
5 import page_sets 5 import page_sets
6 6
7 from telemetry import test 7 from telemetry import benchmark
8 from telemetry.page import page_test 8 from telemetry.page import page_test
9 from telemetry.timeline import counter 9 from telemetry.timeline import counter
10 from telemetry.timeline import model 10 from telemetry.timeline import model
11 11
12 MEMORY_LIMIT_MB = 192 12 MEMORY_LIMIT_MB = 192
13 SINGLE_TAB_LIMIT_MB = 192 13 SINGLE_TAB_LIMIT_MB = 192
14 WIGGLE_ROOM_MB = 8 14 WIGGLE_ROOM_MB = 8
15 15
16 test_harness_script = r""" 16 test_harness_script = r"""
17 var domAutomationController = {}; 17 var domAutomationController = {};
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 def WillNavigateToPage(self, page, tab): 85 def WillNavigateToPage(self, page, tab):
86 # FIXME: Remove webkit.console when blink.console lands in chromium and the 86 # FIXME: Remove webkit.console when blink.console lands in chromium and the
87 # ref builds are updated. crbug.com/386847 87 # ref builds are updated. crbug.com/386847
88 custom_categories = ['webkit.console', 'blink.console', 'gpu'] 88 custom_categories = ['webkit.console', 'blink.console', 'gpu']
89 tab.browser.StartTracing(','.join(custom_categories), 60) 89 tab.browser.StartTracing(','.join(custom_categories), 60)
90 90
91 def _FormatException(self, low_or_high, mb_used): 91 def _FormatException(self, low_or_high, mb_used):
92 return 'Memory allocation too %s (was %d MB, should be %d MB +/- %d MB)' % ( 92 return 'Memory allocation too %s (was %d MB, should be %d MB +/- %d MB)' % (
93 low_or_high, mb_used, SINGLE_TAB_LIMIT_MB, WIGGLE_ROOM_MB) 93 low_or_high, mb_used, SINGLE_TAB_LIMIT_MB, WIGGLE_ROOM_MB)
94 94
95 class Memory(test.Test): 95 class Memory(benchmark.Benchmark):
96 """Tests GPU memory limits""" 96 """Tests GPU memory limits"""
97 test = _MemoryValidator 97 test = _MemoryValidator
98 page_set = page_sets.MemoryTestsPageSet 98 page_set = page_sets.MemoryTestsPageSet
99 99
100 def CreateExpectations(self, page_set): 100 def CreateExpectations(self, page_set):
101 return memory_expectations.MemoryExpectations() 101 return memory_expectations.MemoryExpectations()
102 102
103 def CreatePageSet(self, options): 103 def CreatePageSet(self, options):
104 page_set = super(Memory, self).CreatePageSet(options) 104 page_set = super(Memory, self).CreatePageSet(options)
105 for page in page_set.pages: 105 for page in page_set.pages:
106 page.script_to_evaluate_on_commit = test_harness_script 106 page.script_to_evaluate_on_commit = test_harness_script
107 return page_set 107 return page_set
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/maps.py ('k') | content/test/gpu/gpu_tests/pixel.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698