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.
5 import telemetry.timeline.event as timeline_event
8 class Sample(timeline_event.TimelineEvent):
9 ''' A Sample represents a sample taken at an instant in time
10 plus parameters associated with that sample.
12 NOTE: The Sample class implements the same interface as
13 Slice. These must be kept in sync.
15 All time units are stored in milliseconds.
17 def __init__(self, parent_thread, category, name, timestamp, args=None):
18 super(Sample, self).__init__(
19 category, name, timestamp, 0, args=args)
20 self.parent_thread = parent_thread