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="/base.html">
12 tv.exportTo('tracing.analysis', function() {
13 function StubAnalysisResults() {
18 StubAnalysisResults.prototype = {
19 __proto__: Object.protoype,
21 appendTable: function(parent, className) {
26 table.className = className;
28 table.classList.push(className);
29 table.classList.add = function(className) {
30 table.classList.push(className);
32 this.tables.push(table);
36 appendHeader: function(label) {
40 this.headers.push(header);
44 appendInfo: function(label, value) {
45 this.info.push({label: label, value: value});
48 appendDetailsRow: function(table, start, duration, selfTime, args,
49 selectionGenerator, cpuDuration) {
55 selectionGenerator: selectionGenerator,
56 cpuDuration: cpuDuration});
59 appendHeadRow: function(table) {
61 throw new Error('Only one header row allowed.');
63 return table.headerRow;
66 appendTableCell: function(table, row, text) {
70 appendSpacingRow: function(table) {
71 var row = {spacing: true};
76 appendInfoRow: function(table, label, opt_text) {
77 var row = {label: label, text: opt_text};
82 appendInfoRowTime: function(table, label, time) {
83 var row = {label: label, time: time};
88 appendDataRow: function(table, label, duration, cpuDuration, selfTime,
89 cpuSelfTime, occurences, percentage, details,
94 cpuDuration: cpuDuration,
96 cpuSelfTime: cpuSelfTime,
97 occurences: occurences,
98 percentage: percentage,
100 selectionGenerator: selectionGenerator
102 table.rows.push(row);
108 StubAnalysisResults: StubAnalysisResults