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.
4
5import telemetry.timeline.event as timeline_event
6
7
8class Sample(timeline_event.TimelineEvent):
9  ''' A Sample represents a sample taken at an instant in time
10  plus parameters associated with that sample.
11
12  NOTE: The Sample class implements the same interface as
13  Slice. These must be kept in sync.
14
15  All time units are stored in milliseconds.
16  '''
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
21