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

Side by Side Diff: tools/perf/profile_creators/profile_generator.py

Issue 1005203002: Telemetry: Move ProfileCreator to tools/perf/profile_creator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 """Handles generating profiles and transferring them to/from mobile devices.""" 5 """Handles generating profiles and transferring them to/from mobile devices."""
6 6
7 import logging 7 import logging
8 import optparse 8 import optparse
9 import os 9 import os
10 import shutil 10 import shutil
11 import stat 11 import stat
12 import sys 12 import sys
13 import tempfile 13 import tempfile
14 14
15 from telemetry import benchmark 15 from profile_creators import profile_creator
16 from telemetry.core import browser_options 16 from telemetry.core import browser_options
17 from telemetry.core import discover 17 from telemetry.core import discover
18 from telemetry.core import util 18 from telemetry.core import util
19 from telemetry.page import profile_creator
20 from telemetry.page import test_expectations
21 from telemetry.results import results_options
22 from telemetry.user_story import user_story_runner 19 from telemetry.user_story import user_story_runner
23 20
24 21
25 def _DiscoverProfileCreatorClasses(): 22 def _DiscoverProfileCreatorClasses():
26 profile_creators_dir = os.path.abspath(os.path.join(util.GetBaseDir(), 23 profile_creators_dir = os.path.abspath(os.path.join(util.GetBaseDir(),
27 os.pardir, 'perf', 'profile_creators')) 24 os.pardir, 'perf', 'profile_creators'))
28 base_dir = os.path.abspath(os.path.join(profile_creators_dir, os.pardir)) 25 base_dir = os.path.abspath(os.path.join(profile_creators_dir, os.pardir))
29 26
30 profile_creators_unfiltered = discover.DiscoverClasses( 27 profile_creators_unfiltered = discover.DiscoverClasses(
31 profile_creators_dir, base_dir, profile_creator.ProfileCreator) 28 profile_creators_dir, base_dir, profile_creator.ProfileCreator)
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 "%%prog <--profile-type-to-generate=...> <--browser=...> <--output-dir>") 135 "%%prog <--profile-type-to-generate=...> <--browser=...> <--output-dir>")
139 AddCommandLineArgs(parser) 136 AddCommandLineArgs(parser)
140 _, _ = parser.parse_args() 137 _, _ = parser.parse_args()
141 ProcessCommandLineArgs(parser, options) 138 ProcessCommandLineArgs(parser, options)
142 139
143 # Generate profile. 140 # Generate profile.
144 profile_creators = _DiscoverProfileCreatorClasses() 141 profile_creators = _DiscoverProfileCreatorClasses()
145 profile_creator_class = profile_creators[options.profile_type_to_generate] 142 profile_creator_class = profile_creators[options.profile_type_to_generate]
146 return GenerateProfiles(profile_creator_class, 143 return GenerateProfiles(profile_creator_class,
147 options.profile_type_to_generate, options) 144 options.profile_type_to_generate, options)
OLDNEW
« no previous file with comments | « tools/perf/profile_creators/profile_creator.py ('k') | tools/perf/profile_creators/profile_generator_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698