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

Side by Side Diff: telemetry/telemetry/internal/backends/chrome_inspector/tracing_backend_unittest.py

Issue 2050743002: [telemetry] Enable Chrome logging in TracingBackendTest (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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 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 functools import wraps 5 from functools import wraps
6 import logging 6 import logging
7 import sys 7 import sys
8 import timeit 8 import timeit
9 import unittest 9 import unittest
10 10
(...skipping 29 matching lines...) Expand all
40 return WrappedTest 40 return WrappedTest
41 41
42 42
43 class TracingBackendTest(tab_test_case.TabTestCase): 43 class TracingBackendTest(tab_test_case.TabTestCase):
44 44
45 # Number of consecutively requested memory dumps. 45 # Number of consecutively requested memory dumps.
46 _REQUESTED_DUMP_COUNT = 3 46 _REQUESTED_DUMP_COUNT = 3
47 47
48 @classmethod 48 @classmethod
49 def CustomizeBrowserOptions(cls, options): 49 def CustomizeBrowserOptions(cls, options):
50 options.enable_logging = True
50 options.AppendExtraBrowserArgs([ 51 options.AppendExtraBrowserArgs([
51 # Memory maps currently cannot be retrieved on sandboxed processes. 52 # Memory maps currently cannot be retrieved on sandboxed processes.
52 # See crbug.com/461788. 53 # See crbug.com/461788.
53 '--no-sandbox', 54 '--no-sandbox',
54 55
55 # Workaround to disable periodic memory dumps. See crbug.com/513692. 56 # Workaround to disable periodic memory dumps. See crbug.com/513692.
56 '--enable-memory-benchmarking' 57 '--enable-memory-benchmarking'
57 ]) 58 ])
58 59
59 def setUp(self): 60 def setUp(self):
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 n1 = 1000 247 n1 = 1000
247 while True: 248 while True:
248 t1 = self._MeasureReadTime(n1) 249 t1 = self._MeasureReadTime(n1)
249 if t1 > 0.01: 250 if t1 > 0.01:
250 break 251 break
251 n1 *= 5 252 n1 *= 5
252 t2 = self._MeasureReadTime(n1 * 10) 253 t2 = self._MeasureReadTime(n1 * 10)
253 # Time is an illusion, CPU time is doubly so, allow great deal of tolerance. 254 # Time is an illusion, CPU time is doubly so, allow great deal of tolerance.
254 toleranceFactor = 5 255 toleranceFactor = 5
255 self.assertLess(t2, t1 * 10 * toleranceFactor) 256 self.assertLess(t2, t1 * 10 * toleranceFactor)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698