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

Side by Side Diff: tools/telemetry/telemetry/timeline/surface_flinger_timeline_data.py

Issue 809753002: Revert of telemetry: Clean up SurfaceFlinger statistics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import json
6
7 from telemetry.timeline.timeline_data import TimelineData
8
9
10 class SurfaceFlingerTimelineData(TimelineData):
11 def __init__(self, pid, refresh_period, timestamps):
12 super(SurfaceFlingerTimelineData, self).__init__()
13 self._events = []
14 for ts in timestamps:
15 self._events.append(
16 {'cat': 'SurfaceFlinger',
17 'name': 'vsync_before',
18 'ts': ts,
19 'pid': pid,
20 'tid': pid,
21 'args': {'data': {'frame_count': 1,
22 'refresh_period': refresh_period}}})
23
24 def Serialize(self, f):
25 """Serializes the surface flinger data to a file-like object"""
26 json.dump(self._events, f, indent=4)
27
28 def EventData(self):
29 return self._events
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698