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

Unified Diff: tools/telemetry/telemetry/core/platform/profiling_controller.py

Issue 511653002: Add profiling_controller that manages profilers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/profilers_controller/profiling_controller Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/platform/profiling_controller.py
diff --git a/tools/telemetry/telemetry/core/platform/profiling_controller.py b/tools/telemetry/telemetry/core/platform/profiling_controller.py
new file mode 100644
index 0000000000000000000000000000000000000000..3387c06aeb4d863aa22b65af5ac0e9bc3b4af673
--- /dev/null
+++ b/tools/telemetry/telemetry/core/platform/profiling_controller.py
@@ -0,0 +1,18 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+class ProfilingController(object):
+ def __init__(self, profiling_controller_backend):
+ self._profiling_controller_backend = profiling_controller_backend
+
+ def StartProfiling(self, profiler_name, base_output_file):
tonyg 2014/09/04 17:10:19 I'd prefer the more terse names Start() and Stop()
nednguyen 2014/09/05 17:08:43 Done. I also remove is_profiler_active since it's
+ self._profiling_controller_backend.StartProfiling(
+ profiler_name, base_output_file)
+
+ def StopProfiling(self):
+ return self._profiling_controller_backend.StopProfiling()
+
+ def is_profiler_active(self, profiler_name):
+ return self._profiling_controller_backend.is_profiler_active(profiler_name)

Powered by Google App Engine
This is Rietveld 408576698