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

Side by Side Diff: tools/perf/benchmarks/system_health_unittest.py

Issue 2958093002: [Perf] Update references to telemetry.core.discover (Closed)
Patch Set: Created 3 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 import sys 5 import sys
6 import unittest 6 import unittest
7 7
8 from benchmarks import system_health as system_health_benchmark 8 from benchmarks import system_health as system_health_benchmark
9 from core import path_util 9 from core import path_util
10 from page_sets.system_health import system_health_stories 10 from page_sets.system_health import system_health_stories
11 from page_sets.system_health import system_health_story 11 from page_sets.system_health import system_health_story
12 12
13 from telemetry import benchmark as benchmark_module 13 from telemetry import benchmark as benchmark_module
14 from telemetry.core import discover 14
15 from py_utils import discover
15 16
16 17
17 def _GetAllSystemHealthBenchmarks(): 18 def _GetAllSystemHealthBenchmarks():
18 all_perf_benchmarks = discover.DiscoverClasses( 19 all_perf_benchmarks = discover.DiscoverClasses(
19 path_util.GetPerfBenchmarksDir(), path_util.GetPerfDir(), 20 path_util.GetPerfBenchmarksDir(), path_util.GetPerfDir(),
20 benchmark_module.Benchmark, 21 benchmark_module.Benchmark,
21 index_by_class_name=True).values() 22 index_by_class_name=True).values()
22 return [b for b in all_perf_benchmarks if 23 return [b for b in all_perf_benchmarks if
23 sys.modules[b.__module__] == system_health_benchmark] 24 sys.modules[b.__module__] == system_health_benchmark]
24 25
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 system_health_stories.MobileSystemHealthStorySet().stories) 57 system_health_stories.MobileSystemHealthStorySet().stories)
57 for s in desktop_stories + mobile_stories: 58 for s in desktop_stories + mobile_stories:
58 # Long running stories has their own way of collecting memory dumps, 59 # Long running stories has their own way of collecting memory dumps,
59 # so they explicitly override RunPageInteractions method. 60 # so they explicitly override RunPageInteractions method.
60 if s.name.startswith('long_running:'): 61 if s.name.startswith('long_running:'):
61 continue 62 continue
62 self.assertEquals(s.__class__.RunPageInteractions, 63 self.assertEquals(s.__class__.RunPageInteractions,
63 system_health_story.SystemHealthStory.RunPageInteractions, 64 system_health_story.SystemHealthStory.RunPageInteractions,
64 'Story %s overrides RunPageInteractions. Override _DidLoadDocument ' 65 'Story %s overrides RunPageInteractions. Override _DidLoadDocument '
65 'instead' % s.name) 66 'instead' % s.name)
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/system_health_smoke_test.py ('k') | tools/perf/contrib/cluster_telemetry/multipage_skpicture_printer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698