1 // Copyright (c) 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.
7 tvcm.require('tracing.trace_model.slice');
10 * @fileoverview Provides the AsyncSlice class.
12 tvcm.exportTo('tracing.trace_model', function() {
14 * A AsyncSlice represents an interval of time during which an
15 * asynchronous operation is in progress. An AsyncSlice consumes no CPU time
16 * itself and so is only associated with Threads at its start and end point.
20 function AsyncSlice(category, title, colorId, start, args) {
21 tracing.trace_model.Slice.apply(this, arguments);
24 AsyncSlice.prototype = {
25 __proto__: tracing.trace_model.Slice.prototype,
28 var obj = new Object();
29 var keys = Object.keys(this);
30 for (var i = 0; i < keys.length; i++) {
32 if (typeof this[key] == 'function')
34 if (key == 'startThread' || key == 'endThread') {
35 obj[key] = this[key].guid;
45 startThread: undefined,
53 AsyncSlice: AsyncSlice