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

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

Issue 1884083002: Revert of Rename Heap to ThreadHeap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « tools/perf/measurements/oilpan_gc_times.py ('k') | 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 oilpan_gc_times 5 from measurements import oilpan_gc_times
6 6
7 from telemetry.internal.results import page_test_results 7 from telemetry.internal.results import page_test_results
8 from telemetry.page import page as page_module 8 from telemetry.page import page as page_module
9 from telemetry.testing import options_for_unittests 9 from telemetry.testing import options_for_unittests
10 from telemetry.testing import page_test_test_case 10 from telemetry.testing import page_test_test_case
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 self._results = page_test_results.PageTestResults() 68 self._results = page_test_results.PageTestResults()
69 69
70 70
71 class OilpanGCTimesTest(page_test_test_case.PageTestTestCase): 71 class OilpanGCTimesTest(page_test_test_case.PageTestTestCase):
72 """Smoke test for Oilpan GC pause time measurements. 72 """Smoke test for Oilpan GC pause time measurements.
73 73
74 Runs OilpanGCTimes measurement on some simple pages and verifies 74 Runs OilpanGCTimes measurement on some simple pages and verifies
75 that all metrics were added to the results. The test is purely functional, 75 that all metrics were added to the results. The test is purely functional,
76 i.e. it only checks if the metrics are present and non-zero. 76 i.e. it only checks if the metrics are present and non-zero.
77 """ 77 """
78 _KEY_MARK = 'BlinkGCMarking' 78 _KEY_MARK = 'Heap::collectGarbage'
79 _KEY_LAZY_SWEEP = 'ThreadHeap::lazySweepPages' 79 _KEY_LAZY_SWEEP = 'ThreadHeap::lazySweepPages'
80 _KEY_COMPLETE_SWEEP = 'ThreadState::completeSweep' 80 _KEY_COMPLETE_SWEEP = 'ThreadState::completeSweep'
81 _KEY_COALESCE = 'ThreadHeap::coalesce' 81 _KEY_COALESCE = 'ThreadHeap::coalesce'
82 _KEY_MEASURE = 'BlinkGCTimeMeasurement' 82 _KEY_MEASURE = 'BlinkGCTimeMeasurement'
83 # Do not add 'forced' in reasons to measure. 83 # Do not add 'forced' in reasons to measure.
84 _GC_REASONS = ['precise', 'conservative', 'idle'] 84 _GC_REASONS = ['precise', 'conservative', 'idle']
85 85
86 def setUp(self): 86 def setUp(self):
87 self._options = options_for_unittests.GetCopy() 87 self._options = options_for_unittests.GetCopy()
88 88
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 data.AddSlice(self._KEY_COMPLETE_SWEEP, 862, 42, {}) 284 data.AddSlice(self._KEY_COMPLETE_SWEEP, 862, 42, {})
285 data.AddSlice(self._KEY_MARK, 904, 43, 285 data.AddSlice(self._KEY_MARK, 904, 43,
286 {'lazySweeping': False, 'gcReason': 'IdleGC'}) 286 {'lazySweeping': False, 'gcReason': 'IdleGC'})
287 last_measure = data.AddSlice(self._KEY_COMPLETE_SWEEP, 947, 44, {}) 287 last_measure = data.AddSlice(self._KEY_COMPLETE_SWEEP, 947, 44, {})
288 288
289 # Async event 289 # Async event
290 async_dur = last_measure.end - first_measure.start 290 async_dur = last_measure.end - first_measure.start
291 data.AddAsyncSlice(self._KEY_MEASURE, first_measure.start, async_dur, {}) 291 data.AddAsyncSlice(self._KEY_MEASURE, first_measure.start, async_dur, {})
292 292
293 return data 293 return data
OLDNEW
« no previous file with comments | « tools/perf/measurements/oilpan_gc_times.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698