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

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

Issue 12499006: Telemetry on android: improves RawDisplayFrameRateMeasurement. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/chrome/platform.py
diff --git a/tools/telemetry/telemetry/core/chrome/platform.py b/tools/telemetry/telemetry/core/chrome/platform.py
index d7bb31359781fb0c3a9f61a1611f7e1cf262b430..ec7623257f8785e40e6ae606f96464b568228dd9 100644
--- a/tools/telemetry/telemetry/core/chrome/platform.py
+++ b/tools/telemetry/telemetry/core/chrome/platform.py
@@ -16,14 +16,36 @@ class Platform(object):
"""Platforms may be able to collect GL surface stats."""
return self._platform_backend.IsRawDisplayFrameRateSupported()
- def StartRawDisplayFrameRateMeasurement(self, trace_tag):
+ def StartRawDisplayFrameRateMeasurement(self):
"""Start measuring GL surface stats."""
- return self._platform_backend.StartRawDisplayFrameRateMeasurement(trace_tag)
+ return self._platform_backend.StartRawDisplayFrameRateMeasurement()
def StopRawDisplayFrameRateMeasurement(self):
- """Stop measuring GL surface stats and print results."""
+ """Stop measuring GL surface stats."""
return self._platform_backend.StopRawDisplayFrameRateMeasurement()
+ class RawDisplayFrameRateMeasurement(object):
+ def __init__(self, name, value, unit):
+ self._name = name
+ self._value = value
+ self._unit = unit
+
+ @property
+ def name(self):
+ return self._name
+
+ @property
+ def value(self):
+ return self._value
+
+ @property
+ def unit(self):
+ return self._unit
+
+ def GetRawDisplayFrameRateMeasurements(self):
+ """Returns a list of RawDisplayFrameRateMeasurement."""
+ return self._platform_backend.GetRawDisplayFrameRateMeasurements()
+
def SetFullPerformanceModeEnabled(self, enabled):
"""Platforms may tweak their CPU governor, system status, etc.

Powered by Google App Engine
This is Rietveld 408576698