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

Unified Diff: tools/telemetry/telemetry/core/timeline/async_slice.py

Issue 165673008: [telemetry] Implement first version of timeline based measurement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready for landing Created 6 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/timeline/async_slice.py
diff --git a/tools/telemetry/telemetry/core/timeline/async_slice.py b/tools/telemetry/telemetry/core/timeline/async_slice.py
index 140eadc651b7893e16c64b71b993b16b8e3e0514..7eecaa499338726cb76d11485fba7ea80cf0b00a 100644
--- a/tools/telemetry/telemetry/core/timeline/async_slice.py
+++ b/tools/telemetry/telemetry/core/timeline/async_slice.py
@@ -9,12 +9,13 @@ class AsyncSlice(event.TimelineEvent):
asynchronous operation is in progress. An AsyncSlice consumes no CPU time
itself and so is only associated with Threads at its start and end point.
'''
- def __init__(self, category, name, timestamp, args=None):
+ def __init__(self, category, name, timestamp, args=None,
+ duration=0, start_thread=None, end_thread=None):
super(AsyncSlice, self).__init__(
- category, name, timestamp, duration=0, args=args)
+ category, name, timestamp, duration=duration, args=args)
self.parent_slice = None
- self.start_thread = None
- self.end_thread = None
+ self.start_thread = start_thread
+ self.end_thread = end_thread
self.sub_slices = []
self.id = None

Powered by Google App Engine
This is Rietveld 408576698