3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
8 <link rel="import" href="/tracing/trace_model/slice.html">
14 * @fileoverview Provides the AsyncSlice class.
16 tvcm.exportTo('tracing.trace_model', function() {
18 * A AsyncSlice represents an interval of time during which an
19 * asynchronous operation is in progress. An AsyncSlice consumes no CPU time
20 * itself and so is only associated with Threads at its start and end point.
24 function AsyncSlice(category, title, colorId, start, args) {
25 tracing.trace_model.Slice.apply(this, arguments);
28 AsyncSlice.prototype = {
29 __proto__: tracing.trace_model.Slice.prototype,
32 var obj = new Object();
33 var keys = Object.keys(this);
34 for (var i = 0; i < keys.length; i++) {
36 if (typeof this[key] == 'function')
38 if (key == 'startThread' || key == 'endThread') {
39 obj[key] = this[key].guid;
49 startThread: undefined,
57 AsyncSlice: AsyncSlice