- add sources.
[platform/framework/web/crosswalk.git] / src / tools / telemetry / telemetry / core / timeline / sample.py
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
3 # found in the LICENSE file.
4
5 import telemetry.core.timeline.event as timeline_event
6
7 class Sample(timeline_event.TimelineEvent):
8   ''' A Sample represents a sample taken at an instant in time
9   plus parameters associated with that sample.
10
11   NOTE: The Sample class implements the same interface as
12   Slice. These must be kept in sync.
13
14   All time units are stored in milliseconds.
15   '''
16   def __init__(self, parent_thread, category, name, timestamp, args=None):
17     super(Sample, self).__init__(
18         category, name, timestamp, 0, args=args)
19     self.parent_thread = parent_thread