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

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

Issue 342993002: Allow blink.console or webkit.console in telemetry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 test
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
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 if mb_used - WIGGLE_ROOM_MB > MEMORY_LIMIT_MB: 77 if mb_used - WIGGLE_ROOM_MB > MEMORY_LIMIT_MB:
78 raise page_test.Failure(self._FormatException('high', mb_used)) 78 raise page_test.Failure(self._FormatException('high', mb_used))
79 79
80 def CustomizeBrowserOptions(self, options): 80 def CustomizeBrowserOptions(self, options):
81 options.AppendExtraBrowserArgs('--enable-logging') 81 options.AppendExtraBrowserArgs('--enable-logging')
82 options.AppendExtraBrowserArgs( 82 options.AppendExtraBrowserArgs(
83 '--force-gpu-mem-available-mb=%s' % MEMORY_LIMIT_MB) 83 '--force-gpu-mem-available-mb=%s' % MEMORY_LIMIT_MB)
84 84
85 def WillNavigateToPage(self, page, tab): 85 def WillNavigateToPage(self, page, tab):
86 custom_categories = ['webkit.console', 'gpu'] 86 custom_categories = ['webkit.console', 'blink.console', 'gpu']
87 tab.browser.StartTracing(','.join(custom_categories), 60) 87 tab.browser.StartTracing(','.join(custom_categories), 60)
88 88
89 def _FormatException(self, low_or_high, mb_used): 89 def _FormatException(self, low_or_high, mb_used):
90 return 'Memory allocation too %s (was %d MB, should be %d MB +/- %d MB)' % ( 90 return 'Memory allocation too %s (was %d MB, should be %d MB +/- %d MB)' % (
91 low_or_high, mb_used, SINGLE_TAB_LIMIT_MB, WIGGLE_ROOM_MB) 91 low_or_high, mb_used, SINGLE_TAB_LIMIT_MB, WIGGLE_ROOM_MB)
92 92
93 class Memory(test.Test): 93 class Memory(test.Test):
94 """Tests GPU memory limits""" 94 """Tests GPU memory limits"""
95 test = _MemoryValidator 95 test = _MemoryValidator
96 page_set = page_sets.MemoryTestsPageSet 96 page_set = page_sets.MemoryTestsPageSet
97 97
98 def CreateExpectations(self, page_set): 98 def CreateExpectations(self, page_set):
99 return memory_expectations.MemoryExpectations() 99 return memory_expectations.MemoryExpectations()
100 100
101 def CreatePageSet(self, options): 101 def CreatePageSet(self, options):
102 page_set = super(Memory, self).CreatePageSet(options) 102 page_set = super(Memory, self).CreatePageSet(options)
103 for page in page_set.pages: 103 for page in page_set.pages:
104 page.script_to_evaluate_on_commit = test_harness_script 104 page.script_to_evaluate_on_commit = test_harness_script
105 return page_set 105 return page_set
OLDNEW
« no previous file with comments | « no previous file | tools/perf/measurements/image_decoding.py » ('j') | tools/perf/measurements/image_decoding.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698