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
3 # found in the LICENSE file.
7 from telemetry.core import discover
8 from telemetry.core import util
9 from telemetry.core.platform import profiler
12 def _DiscoverProfilers():
13 profiler_dir = os.path.dirname(__file__)
14 return discover.DiscoverClasses(profiler_dir, util.GetTelemetryDir(),
15 profiler.Profiler).values()
18 def FindProfiler(name):
19 for p in _DiscoverProfilers():
25 def GetAllAvailableProfilers():
26 return sorted([p.name() for p in _DiscoverProfilers()
27 if p.is_supported(browser_type='any')])