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

Unified Diff: tools/telemetry/telemetry/core/timeline/tracing/slice.py

Issue 19772005: [telemetry] Timeline model cleanups (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/tracing/slice.py
diff --git a/tools/telemetry/telemetry/core/timeline/tracing/slice.py b/tools/telemetry/telemetry/core/timeline/tracing/slice.py
deleted file mode 100644
index 178b33a00d7e8e32bd8e283f8f40ca44eef16b99..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/core/timeline/tracing/slice.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import telemetry.core.timeline.event as timeline_event
-
-class Slice(timeline_event.TimelineEvent):
- ''' A Slice represents an interval of time plus parameters associated
- with that interval.
-
- NOTE: The Sample class implements the same interface as
- Slice. These must be kept in sync.
-
- All time units are stored in milliseconds.
- '''
- def __init__(self, category, name, timestamp, args=None, parent=None):
- super(Slice, self).__init__(
- name, timestamp, 0, args=args, parent=parent)
- self._sub_slices = []
- self.category = category
- self.did_not_finish = False
-
- @property
- def sub_slices(self):
- return self._sub_slices
-
- def AddSubSlice(self, sub_slice):
- self._sub_slices.append(sub_slice)
-
- def _GetSubSlicesRecursive(self):
- for sub_slice in self._sub_slices:
- for s in sub_slice.GetAllSubSlices():
- yield s
- yield sub_slice
-
- def GetAllSubSlices(self):
- return list(self._GetSubSlicesRecursive())
-
- def GetAllSubSlicesOfName(self, name):
- return [e for e in self.GetAllSubSlices() if e.name == name]
« no previous file with comments | « tools/telemetry/telemetry/core/timeline/tracing/sample.py ('k') | tools/telemetry/telemetry/core/timeline/tracing/thread.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698