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. |