1 // Copyright (c) 2012 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.exportTo('tracing.analysis', function() {
8 function StubAnalysisResults() {
13 StubAnalysisResults.prototype = {
14 __proto__: Object.protoype,
16 appendTable: function(parent, className) {
21 table.className = className;
23 table.classList.push(className);
24 table.classList.add = function(className) {
25 table.classList.push(className);
27 this.tables.push(table);
31 appendHeader: function(label) {
35 this.headers.push(header);
39 appendInfo: function(label, value) {
40 this.info.push({label: label, value: value});
43 appendDetailsRow: function(table, start, duration, selfTime, args,
44 selectionGenerator, cpuDuration) {
50 selectionGenerator: selectionGenerator,
51 cpuDuration: cpuDuration});
54 appendHeadRow: function(table) {
56 throw new Error('Only one header row allowed.');
58 return table.headerRow;
61 appendTableCell: function(table, row, text) {
65 appendSpacingRow: function(table) {
66 var row = {spacing: true};
71 appendInfoRow: function(table, label, opt_text) {
72 var row = {label: label, text: opt_text};
77 appendInfoRowTime: function(table, label, time) {
78 var row = {label: label, time: time};
83 appendDataRow: function(table, label, duration, cpuDuration, selfTime,
84 cpuSelfTime, occurences, percentage, details,
89 cpuDuration: cpuDuration,
91 cpuSelfTime: cpuSelfTime,
92 occurences: occurences,
93 percentage: percentage,
95 selectionGenerator: selectionGenerator
103 StubAnalysisResults: StubAnalysisResults