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

Side by Side Diff: tools/telemetry/telemetry/core/timeline/process.py

Issue 100073003: telemetry: Add thread time to telmetry timeline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 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 import telemetry.core.timeline.event_container as event_container 5 import telemetry.core.timeline.event_container as event_container
6 import telemetry.core.timeline.counter as tracing_counter 6 import telemetry.core.timeline.counter as tracing_counter
7 import telemetry.core.timeline.thread as tracing_thread 7 import telemetry.core.timeline.thread as tracing_thread
8 8
9 class Process(event_container.TimelineEventContainer): 9 class Process(event_container.TimelineEventContainer):
10 ''' The Process represents a single userland process in the trace. 10 ''' The Process represents a single userland process in the trace.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 'Counter %s not found in process with id %s.' % (counter_id, 54 'Counter %s not found in process with id %s.' % (counter_id,
55 self.pid)) 55 self.pid))
56 def GetOrCreateCounter(self, category, name): 56 def GetOrCreateCounter(self, category, name):
57 try: 57 try:
58 return self.GetCounter(category, name) 58 return self.GetCounter(category, name)
59 except ValueError: 59 except ValueError:
60 ctr = tracing_counter.Counter(self, category, name) 60 ctr = tracing_counter.Counter(self, category, name)
61 self._counters[ctr.full_name] = ctr 61 self._counters[ctr.full_name] = ctr
62 return ctr 62 return ctr
63 63
64 def AutoCloseOpenSlices(self, max_timestamp): 64 def AutoCloseOpenSlices(self, max_timestamp, max_thread_timestamp):
65 for thread in self._threads.itervalues(): 65 for thread in self._threads.itervalues():
66 thread.AutoCloseOpenSlices(max_timestamp) 66 thread.AutoCloseOpenSlices(max_timestamp, max_thread_timestamp)
67 67
68 def FinalizeImport(self): 68 def FinalizeImport(self):
69 for thread in self._threads.itervalues(): 69 for thread in self._threads.itervalues():
70 thread.FinalizeImport() 70 thread.FinalizeImport()
71 for counter in self._counters.itervalues(): 71 for counter in self._counters.itervalues():
72 counter.FinalizeImport() 72 counter.FinalizeImport()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698