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

Side by Side Diff: tools/telemetry/telemetry/core/chrome/timeline_event.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 class TimelineEvent(object): 5 class TimelineEvent(object):
6 """Represents a timeline event.""" 6 """Represents a timeline event."""
7 def __init__(self, name, start_time_ms, duration_ms, args=None): 7 def __init__(self, name, start_time_ms, duration_ms, args=None):
8 self.name = name 8 self.name = name
9 self.start_time_ms = start_time_ms 9 self.start_time_ms = start_time_ms
10 self.duration_ms = duration_ms 10 self.duration_ms = duration_ms
(...skipping 28 matching lines...) Expand all
39 events.append(item) 39 events.append(item)
40 for child in item.children: 40 for child in item.children:
41 TimelineEvent._GetAllChildrenRecursive(events, child) 41 TimelineEvent._GetAllChildrenRecursive(events, child)
42 42
43 def GetAllChildrenRecursive(self, include_self=False): 43 def GetAllChildrenRecursive(self, include_self=False):
44 events = [] 44 events = []
45 TimelineEvent._GetAllChildrenRecursive(events, self) 45 TimelineEvent._GetAllChildrenRecursive(events, self)
46 if not include_self: 46 if not include_self:
47 del events[0] 47 del events[0]
48 return events 48 return events
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698