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

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

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 telemetry.timeline.event as event
6
7
8 class AsyncSlice(event.TimelineEvent):
9 """An AsyncSlice represents an interval of time during which an
10 asynchronous operation is in progress. An AsyncSlice consumes no CPU time
11 itself and so is only associated with Threads at its start and end point.
12 """
13 def __init__(self, category, name, timestamp, args=None,
14 duration=0, start_thread=None, end_thread=None,
15 thread_start=None, thread_duration=None):
16 super(AsyncSlice, self).__init__(
17 category, name, timestamp, duration, thread_start, thread_duration,
18 args)
19 self.parent_slice = None
20 self.start_thread = start_thread
21 self.end_thread = end_thread
22 self.sub_slices = []
23 self.id = None
24
25 def AddSubSlice(self, sub_slice):
26 assert sub_slice.parent_slice == self
27 self.sub_slices.append(sub_slice)
28
29 def IterEventsInThisContainerRecrusively(self):
30 for sub_slice in self.sub_slices:
31 yield sub_slice
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/timeline/__init__.py ('k') | tools/telemetry/telemetry/timeline/bounds.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698