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

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

Issue 11428107: Telemetry: extends Platform abstraction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Platform API Created 8 years 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/platform.py
diff --git a/tools/telemetry/telemetry/platform.py b/tools/telemetry/telemetry/platform.py
index c668f7b2a62d402c8dc520da45102130ef8e7235..30e6bec9518e19e0de864d48fd15752825809a4c 100644
--- a/tools/telemetry/telemetry/platform.py
+++ b/tools/telemetry/telemetry/platform.py
@@ -5,18 +5,34 @@
class Platform(object):
nduca 2012/12/07 18:12:06 By subclassing the platform, you override the doc
bulach 2012/12/07 20:45:53 ahn, thanks! I didn't know the the docstrings were
"""The platform that the target browser is running on.
- Provides a limited interface to obtain stats from the platform itself, where
- possible.
+ Provides a limited interface to interact with the platform itself, where
+ possible. It's important to note that platforms may not provide a specific
+ API, so check with IsFooBar() for availability.
"""
-
- def GetSurfaceCollector(self, trace_tag):
+ def IsRawDisplayFrameRateSupported(self):
"""Platforms may be able to collect GL surface stats."""
- class StubSurfaceCollector(object):
- def __init__(self, trace_tag):
- pass
- def __enter__(self):
- pass
- def __exit__(self, *args):
- pass
-
- return StubSurfaceCollector(trace_tag)
+ return False
+
+ def StartRawDisplayFrameRate(self, trace_tag):
nduca 2012/12/07 18:12:06 Not clear whether you need a stop.
bulach 2012/12/07 20:45:53 Done.
+ """Start collecting GL surface stats."""
+ raise NotImplementedError()
+
+ def GetRawDisplayFrameRate(self):
+ """Prints GL surface stats."""
nduca 2012/12/07 18:12:06 Not clear from the API if this can be called multi
bulach 2012/12/07 20:45:53 Done.
+ raise NotImplementedError()
+
+ def SetFullPerformanceModeEnabled(self, enabled):
+ """Platforms may tweak their CPU governor, system status, etc."""
nduca 2012/12/07 18:12:06 You might want to improve this docstring. Somethi
bulach 2012/12/07 20:45:53 Done.
+ pass
+
+ def CanMonitorThermalThrottling(self):
nduca 2012/12/07 18:12:06 Again, more docstring is good Some fan-less compu
bulach 2012/12/07 20:45:53 Done.
+ """Platforms may be able to detect thermal throttling."""
+ return False
+
+ def StartMonitoringThermalThrottling(self):
+ """Start monitoring thermal throttling."""
+ raise NotImplementedError()
+
+ def StopMonitoringThermalThrottling(self):
nduca 2012/12/07 18:12:06 Why start and stop? Why not just IsDeviceThermally
bulach 2012/12/07 20:45:53 Done.
+ """Stops monitoring thermal throttling."""
+ raise NotImplementedError()

Powered by Google App Engine
This is Rietveld 408576698