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

Side by Side Diff: tools/perf/perf_tools/memory_benchmark_unittest.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 years, 10 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
« no previous file with comments | « tools/perf/perf_tools/memory_benchmark.py ('k') | tools/perf/perf_tools/octane.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) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 from telemetry import multi_page_benchmark_unittest_base
5 from perf_tools import memory_benchmark 4 from perf_tools import memory_benchmark
5 from telemetry.page import multi_page_benchmark_unittest_base
6 6
7 class MemoryBenchmarkUnitTest( 7 class MemoryBenchmarkUnitTest(
8 multi_page_benchmark_unittest_base.MultiPageBenchmarkUnitTestBase): 8 multi_page_benchmark_unittest_base.MultiPageBenchmarkUnitTestBase):
9 9
10 def testMemoryBenchmark(self): 10 def testMemoryBenchmark(self):
11 ps = self.CreatePageSetFromFileInUnittestDataDir('page_with_link.html') 11 ps = self.CreatePageSetFromFileInUnittestDataDir('page_with_link.html')
12 ps.pages[0].stress_memory = {'action': 'click_element_action', 12 ps.pages[0].stress_memory = {'action': 'click_element_action',
13 'text': 'Click me'} 13 'text': 'Click me'}
14 14
15 benchmark = memory_benchmark.MemoryBenchmark() 15 benchmark = memory_benchmark.MemoryBenchmark()
16 all_results = self.RunBenchmark(benchmark, ps) 16 all_results = self.RunBenchmark(benchmark, ps)
17 17
18 self.assertEqual(0, len(all_results.page_failures)) 18 self.assertEqual(0, len(all_results.page_failures))
19 self.assertEqual(1, len(all_results.page_results)) 19 self.assertEqual(1, len(all_results.page_results))
20 20
21 results0 = all_results.page_results[0] 21 results0 = all_results.page_results[0]
22 expected_measurements = ['V8_MemoryExternalFragmentationTotal', 22 expected_measurements = ['V8_MemoryExternalFragmentationTotal',
23 'V8_MemoryHeapSampleTotalCommitted', 23 'V8_MemoryHeapSampleTotalCommitted',
24 'V8_MemoryHeapSampleTotalUsed'] 24 'V8_MemoryHeapSampleTotalUsed']
25 25
26 self.assertTrue(all( 26 self.assertTrue(all(
27 [m in results0.measurement_names for m in expected_measurements])) 27 [m in results0.measurement_names for m in expected_measurements]))
OLDNEW
« no previous file with comments | « tools/perf/perf_tools/memory_benchmark.py ('k') | tools/perf/perf_tools/octane.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698