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

Side by Side Diff: tools/perf/measurements/v8_detached_context_age_in_gc_unittest.py

Issue 1029263003: [telemetry] Sort imports in Telemetry and its dependents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure we're up to date. Created 5 years, 9 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 measurements import v8_detached_context_age_in_gc
6 from telemetry.core import wpr_modes 5 from telemetry.core import wpr_modes
6 from telemetry.page import page as page_module
7 from telemetry.page import page_test 7 from telemetry.page import page_test
8 from telemetry.page import page as page_module
9 from telemetry.results import page_test_results 8 from telemetry.results import page_test_results
10 from telemetry.unittest_util import options_for_unittests 9 from telemetry.unittest_util import options_for_unittests
11 from telemetry.unittest_util import page_test_test_case 10 from telemetry.unittest_util import page_test_test_case
12 from telemetry.value import skip 11 from telemetry.value import skip
13 12
13 from measurements import v8_detached_context_age_in_gc
14
14 15
15 class FakePage(object): 16 class FakePage(object):
16 def __init__(self, url): 17 def __init__(self, url):
17 self.url = url 18 self.url = url
18 self.is_file = url.startswith('file://') 19 self.is_file = url.startswith('file://')
19 20
20 21
21 class FakeTab(object): 22 class FakeTab(object):
22 def __init__(self, histograms): 23 def __init__(self, histograms):
23 self.histograms = histograms 24 self.histograms = histograms
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 def testWithSimplePage(self): 90 def testWithSimplePage(self):
90 page_set = self.CreateEmptyPageSet() 91 page_set = self.CreateEmptyPageSet()
91 page = SimplePage(page_set) 92 page = SimplePage(page_set)
92 page_set.AddUserStory(page) 93 page_set.AddUserStory(page)
93 metric = v8_detached_context_age_in_gc.V8DetachedContextAgeInGC() 94 metric = v8_detached_context_age_in_gc.V8DetachedContextAgeInGC()
94 results = self.RunMeasurement(metric, page_set, options=self._options) 95 results = self.RunMeasurement(metric, page_set, options=self._options)
95 self.assertEquals(0, len(results.failures)) 96 self.assertEquals(0, len(results.failures))
96 actual = _ActualValues(results)['V8_DetachedContextAgeInGC'] 97 actual = _ActualValues(results)['V8_DetachedContextAgeInGC']
97 self.assertLessEqual(0, actual.value) 98 self.assertLessEqual(0, actual.value)
98 self.assertEqual('garbage_collections', actual.units) 99 self.assertEqual('garbage_collections', actual.units)
OLDNEW
« no previous file with comments | « tools/perf/measurements/v8_detached_context_age_in_gc.py ('k') | tools/perf/measurements/v8_gc_times_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698