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

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

Issue 332213003: Move telemetry/core/timeline and timeline_data to telemetry/timeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « tools/telemetry/telemetry/core/timeline/slice.py ('k') | tools/telemetry/telemetry/core/timeline/thread.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/timeline/slice_unittest.py
diff --git a/tools/telemetry/telemetry/core/timeline/slice_unittest.py b/tools/telemetry/telemetry/core/timeline/slice_unittest.py
deleted file mode 100644
index 8a75f0b46a9ac8bc440ae61de051843f34a6af72..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/core/timeline/slice_unittest.py
+++ /dev/null
@@ -1,34 +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 unittest
-
-from telemetry.core.timeline.slice import Slice
-
-class SliceTest(unittest.TestCase):
- def testChildrenLogic(self):
- # [ top ]
- # [ a ] [ b ]
- # [x]
- top = Slice(None, 'cat', 'top', 0, duration=10, thread_timestamp=0,
- thread_duration=5)
- a = Slice(None, 'cat', 'a', 1, duration=2, thread_timestamp=0.5,
- thread_duration=1)
- x = Slice(None, 'cat', 'x', 1.5, duration=0.25, thread_timestamp=0.75,
- thread_duration=0.125)
- b = Slice(None, 'cat', 'b', 5, duration=2, thread_timestamp=None,
- thread_duration=None)
- top.sub_slices.extend([a, b])
- a.sub_slices.append(x)
-
- all_children = list(top.IterEventsInThisContainerRecrusively())
- self.assertEquals([a, x, b], all_children)
-
- self.assertEquals(x.self_time, 0.25)
- self.assertEquals(a.self_time, 1.75) # 2 - 0.25
- self.assertEquals(top.self_time, 6) # 10 - 2 - 2
-
- self.assertEquals(x.self_thread_time, 0.125)
- self.assertEquals(a.self_thread_time, 0.875) # 1 - 0.125
- self.assertEquals(top.self_thread_time, None) # b has no thread time
« no previous file with comments | « tools/telemetry/telemetry/core/timeline/slice.py ('k') | tools/telemetry/telemetry/core/timeline/thread.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698