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

Unified Diff: tools/perf/measurements/smoothness.py

Issue 23902027: telemetry: Make trace profiler work with trace-based benchmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tracking nesting calls on Start/StopTracing. Created 7 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/perf/measurements/smoothness.py
diff --git a/tools/perf/measurements/smoothness.py b/tools/perf/measurements/smoothness.py
index a26ba682913a7d981a11cc3b295fab93a717b7db..e789380e4cad666d03dc59ff8d1f2dbd5eab56b0 100644
--- a/tools/perf/measurements/smoothness.py
+++ b/tools/perf/measurements/smoothness.py
@@ -28,6 +28,7 @@ class Smoothness(page_measurement.PageMeasurement):
super(Smoothness, self).__init__('smoothness')
self.force_enable_threaded_compositing = False
self._metrics = None
+ self._timeline = None
def AddCommandLineOptions(self, parser):
parser.add_option('--report-all-results', dest='report_all_results',
@@ -43,9 +44,7 @@ class Smoothness(page_measurement.PageMeasurement):
return hasattr(page, 'smoothness')
def WillRunAction(self, page, tab, action):
- # TODO(ernstm): remove 'webkit' category when
- # https://codereview.chromium.org/23848006/ has landed.
- tab.browser.StartTracing('webkit,webkit.console,benchmark', 60)
+ tab.browser.StartTracing('webkit.console,benchmark', 60)
if tab.browser.platform.IsRawDisplayFrameRateSupported():
tab.browser.platform.StartRawDisplayFrameRateMeasurement()
self._metrics = smoothness.SmoothnessMetrics(tab)
@@ -59,7 +58,7 @@ class Smoothness(page_measurement.PageMeasurement):
tab.browser.platform.StopRawDisplayFrameRateMeasurement()
if not action.CanBeBound():
self._metrics.Stop()
- tab.browser.StopTracing()
+ self._timeline = tab.browser.StopTracing().AsTimelineModel()
tonyg 2013/09/12 00:49:55 Same question about whether we should do the AsTim
ernstm 2013/09/12 18:06:07 Done.
def FindTimelineMarker(self, timeline):
events = [s for
@@ -80,8 +79,7 @@ class Smoothness(page_measurement.PageMeasurement):
smoothness.CalcFirstPaintTimeResults(results, tab)
- timeline = tab.browser.GetTraceResultAndReset().AsTimelineModel()
- timeline_marker = self.FindTimelineMarker(timeline)
+ timeline_marker = self.FindTimelineMarker(self._timeline)
benchmark_stats = GpuRenderingStats(timeline_marker,
rendering_stats_deltas,
self._metrics.is_using_gpu_benchmarking)

Powered by Google App Engine
This is Rietveld 408576698