blob: 38b69a1050e862703582888cb4ab826a0641de64 [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright 2016 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/tracing/base/iteration_helpers.html">
<link rel="import" href="/tracing/base/multi_dimensional_view.html">
<link rel="import" href="/tracing/core/test_utils.html">
<script>
'use strict';
tr.b.unittest.testSuite(function() {
var MultiDimensionalViewBuilder = tr.b.MultiDimensionalViewBuilder;
var MultiDimensionalViewType = tr.b.MultiDimensionalViewType;
var MultiDimensionalViewNode = tr.b.MultiDimensionalViewNode;
var SELF = MultiDimensionalViewBuilder.ValueKind.SELF;
var TOTAL = MultiDimensionalViewBuilder.ValueKind.TOTAL;
var RecursionDepthTracker = tr.b.RecursionDepthTracker;
var zFunction = tr.b.zFunction;
function assertListStrictEqual(a, b) {
assert.lengthOf(a, b.length);
for (var i = 0; i < a.length; i++)
assert.strictEqual(a[i], b[i]);
}
function checkTree(actualTreeRootNode, expectedStructureRootNode) {
// Build map from expected structure node IDs to expected structure nodes.
var expectedStructureNodesById = new Map();
addExpectedStructureToMap(
expectedStructureRootNode, expectedStructureNodesById);
// Recursively check the structure of the actual tree.
var actualTreeNodesById = new Map();
checkTreeStructure(actualTreeRootNode, expectedStructureRootNode,
actualTreeNodesById, expectedStructureNodesById);
// Test sanity check.
assert.strictEqual(
actualTreeNodesById.size, expectedStructureNodesById.size);
}
function addExpectedStructureToMap(expectedStructureNode, map) {
if (typeof expectedStructureNode === 'string')
return; // Reference to another expected structure node.
var expectedStructureNodeId = expectedStructureNode.id;
if (expectedStructureNodeId !== undefined) {
assert.isFalse(map.has(expectedStructureNodeId));
map.set(expectedStructureNodeId, expectedStructureNode);
}
var expectedStructureChildren = expectedStructureNode.children;
for (var d = 0; d < expectedStructureChildren.length; d++) {
var expectedStructureDimensionChildren = expectedStructureChildren[d];
for (var i = 0; i < expectedStructureDimensionChildren.length; i++)
addExpectedStructureToMap(expectedStructureDimensionChildren[i], map);
}
}
function checkTreeStructure(actualTreeNode, expectedStructureNode,
actualTreeNodesById, expectedStructureNodesById) {
// Check the multi-dimensional title.
assert.deepEqual(
tr.b.asArray(actualTreeNode.title), expectedStructureNode.title);
// Check the values.
assert.strictEqual(actualTreeNode.total, expectedStructureNode.total);
assert.strictEqual(actualTreeNode.self, expectedStructureNode.self);
assert.strictEqual(
actualTreeNode.isLowerBound, expectedStructureNode.isLowerBound);
// Check the children.
var expectedStructureChildNodes = expectedStructureNode.children;
var actualTreeChildNodes = actualTreeNode.children;
assert.lengthOf(actualTreeChildNodes, expectedStructureChildNodes.length);
for (var d = 0; d < expectedStructureChildNodes.length; d++) {
var expectedStructureDimensionChildNodes = expectedStructureChildNodes[d];
var actualTreeDimensionChildNodes = actualTreeChildNodes[d];
assert.strictEqual(actualTreeDimensionChildNodes.size,
expectedStructureDimensionChildNodes.length);
var expectedStructureDimensionChildNodeTitles = new Set();
for (var i = 0; i < expectedStructureDimensionChildNodes.length; i++) {
var expectedStructureDimensionChildNode =
expectedStructureDimensionChildNodes[i];
var isReference = false;
// If the expected structure child node is a reference to another
// expected structure node, resolve it.
if (typeof expectedStructureDimensionChildNode === 'string') {
expectedStructureDimensionChildNode = expectedStructureNodesById.get(
expectedStructureDimensionChildNode);
assert.isDefined(expectedStructureDimensionChildNode);
isReference = true;
}
// Check that the expected structure doesn't contain two children with
// the same title.
var childTitle = expectedStructureDimensionChildNode.title[d];
assert.isFalse(
expectedStructureDimensionChildNodeTitles.has(childTitle));
expectedStructureDimensionChildNodeTitles.add(childTitle);
// Get the associated child node of the actual tree.
var actualTreeDimensionChildNode =
actualTreeDimensionChildNodes.get(childTitle);
assert.isDefined(actualTreeDimensionChildNode);
// Check that all expected structure nodes with the same ID correspond
// to the same actual tree node.
var childId = expectedStructureDimensionChildNode.id;
if (childId !== undefined) {
if (actualTreeNodesById.has(childId)) {
assert.strictEqual(actualTreeDimensionChildNode,
actualTreeNodesById.get(childId));
} else {
actualTreeNodesById.set(childId, actualTreeDimensionChildNode);
}
}
// Recursively check the structure of the actual tree child node
// (unless the expected structure child node was a reference).
if (!isReference) {
checkTreeStructure(actualTreeDimensionChildNode,
expectedStructureDimensionChildNode, actualTreeNodesById,
expectedStructureNodesById);
}
}
// Test sanity check (all child titles should be unique).
assert.strictEqual(expectedStructureDimensionChildNodeTitles.size,
expectedStructureDimensionChildNodes.length);
}
}
function createBuilderWithEntries(dimensions, pathEntries) {
var builder = new MultiDimensionalViewBuilder(dimensions);
pathEntries.forEach(function(pathEntry) {
builder.addPath(pathEntry.path, pathEntry.value, pathEntry.kind);
});
return builder;
}
function builderTest(testName, dimensions, pathEntries,
expectedTopDownTreeViewStructure, expectedTopDownHeavyViewStructure,
expectedBottomUpHeavyViewStructure) {
test('builder_' + testName, function() {
// Create a multi-dimensional tree builder and add all paths to it.
var builder = createBuilderWithEntries(dimensions, pathEntries);
// Build and check the views.
checkTree(
builder.buildView(MultiDimensionalViewType.TOP_DOWN_TREE_VIEW),
expectedTopDownTreeViewStructure);
checkTree(
builder.buildView(MultiDimensionalViewType.TOP_DOWN_HEAVY_VIEW),
expectedTopDownHeavyViewStructure);
checkTree(
builder.buildView(MultiDimensionalViewType.BOTTOM_UP_HEAVY_VIEW),
expectedBottomUpHeavyViewStructure);
});
}
/**
* Calculate the sum of binary powers.
*
* Each exponent can either be (1) a single number corresponding to a single
* power of two (2**exponent), or (2) a two-element list for a sum over a
* range of exponents (2**exponent[0] + 2**(exponent[0] + 1) + ... +
* 2**exponent[1]).
*/
function b(/* exponent1, ..., exponentN */) {
var sum = 0;
for (var i = 0; i < arguments.length; i++) {
var exponent = arguments[i];
if (typeof exponent === 'number') {
sum += 1 << arguments[i];
} else {
assert.lengthOf(exponent, 2); // Test sanity check.
// We use the fact that 2**A + 2**(A + 1) ... + 2**B =
// (2**0 + 2**1 + ... 2**B) - (2**0 + 2**1 + ... + 2**(A - 1)) =
// (2**(B + 1) - 1) - (2**A - 1) = 2**(B + 1) - 2**A.
sum += (1 << (exponent[1] + 1)) - (1 << exponent[0]);
}
}
return sum;
}
function checkZFunction(list, expectedResult) {
if (typeof list === 'string') {
assert.deepEqual(zFunction(list, 0), expectedResult);
assert.deepEqual(zFunction(list[0] + list, 1), expectedResult);
assert.deepEqual(zFunction(list + list, list.length), expectedResult);
} else {
assert.deepEqual(zFunction([].concat(list), 0), expectedResult);
assert.deepEqual(zFunction([list[0]].concat(list), 1), expectedResult);
assert.deepEqual(
zFunction(list.concat(list), list.length), expectedResult);
}
}
/**
* Helper function for generating builder tests. Given a number of dimensions
* and a list of path entries, this function generates the source code of
* the corresponding builder test with expected top-down tree view, top-down
* heavy view and bottom-up heavy view structures.
*
* This avoids the need to write such tests manually, which is very tedious.
* However, the correctness of the generated structures needs to be verified
* by the developer! Maximum line length must also be enforced manually.
*/
function generateBuilderTest(targetTestName, dimensions, pathEntries) {
test('builderTestGenerator_' + targetTestName, function() {
// Create the builder.
var builder = createBuilderWithEntries(dimensions, pathEntries);
// Generate the test case source code.
var generator = new tr.c.TestUtils.SourceGenerator();
generator.indentBlock(2, false /* don't break line */, function() {
// Test name and number of dimensions (first line).
generator.push('builderTest(\'', targetTestName, '\', ',
String(dimensions), ' /* dimensions */,');
generator.indentBlock(4, true /* break line */, function() {
// Path entries.
generator.formatMultiLineList(pathEntries, function(pathEntry) {
generator.push('{ path: ');
generator.formatSingleLineList(
pathEntry.path,
function(singleDimensionPath) {
generator.formatSingleLineList(
singleDimensionPath, generator.formatString, generator);
});
generator.push(', value: ', String(pathEntry.value));
var kind = pathEntry.kind === SELF ? 'SELF' : 'TOTAL';
generator.push(', kind: ', kind, ' }');
});
generator.push(',');
generator.breakLine();
function formatExpectedTreeStructure(root, label) {
var nextNodeId = 0;
var nodeInfos = new WeakMap();
function assignNodeIdsToRepeatedNodes(node) {
if (nodeInfos.has(node)) {
// We have already visited the node (one or more times), so
// there is no need to visit its children.
if (nodeInfos.get(node) === undefined) {
// This is the second time we visited the node: Change the
// undefined entry to a defined node info entry.
nodeInfos.set(node, { id: undefined });
}
return;
}
// This is the first time we visited the node: Add an undefined
// entry to the node info map and recursively visit all its
// children.
nodeInfos.set(node, undefined);
node.children.forEach(function(singleDimensionChildren) {
for (var child of singleDimensionChildren.values())
assignNodeIdsToRepeatedNodes(child);
});
}
assignNodeIdsToRepeatedNodes(root);
// Track the multi-dimensional path to the current node to generate
// comments.
var paths = new Array(dimensions);
for (var i = 0; i < paths.length; i++)
paths[i] = [];
function withChild(childNode, dimension, callback) {
paths[dimension].push(childNode.title[dimension]);
callback();
paths[dimension].pop();
}
function appendPathComment(opt_label) {
if (opt_label) {
generator.pushComment(opt_label);
return;
}
paths.forEach(function(dimensionPath, dimensionIndex) {
if (dimensionIndex > 0)
generator.pushComment(', ');
if (dimensionPath.length === 0) {
generator.pushComment('*');
return;
}
dimensionPath.forEach(function(ancestorTitle, ancestorIndex) {
if (ancestorIndex > 0)
generator.pushComment(' -> ');
generator.pushComment(ancestorTitle);
});
});
}
function formatExpectedTreeStructureRecursively(node, opt_label) {
var nodeId = undefined;
var nodeInfo = nodeInfos.get(node);
if (nodeInfo !== undefined) {
// This node is referenced multiple times in the expected tree
// structure.
nodeId = nodeInfo.id;
if (nodeId === undefined) {
// This is the first time we visited the node: Assign it a
// unique node id and then format it and its descendants
// recursively.
nodeId = '#' + (nextNodeId++);
nodeInfo.id = nodeId;
} else {
// We have already visited this node: Just insert the node's
// id (instead of formatting it and its descendants
// recursively again).
generator.push('\'', nodeId, '\'');
appendPathComment();
return;
}
}
generator.push('{');
appendPathComment(opt_label);
generator.indentBlock(2, true /* break line */, function() {
// Node id (if defined).
if (nodeId !== undefined) {
generator.push('id: \'', nodeId, '\',');
generator.breakLine();
}
// Node title.
generator.push('title: ');
generator.formatSingleLineList(
node.title, generator.formatString, generator);
generator.push(',');
generator.breakLine();
// Node values.
generator.push('total: ', String(node.total), ',');
generator.breakLine();
generator.push('self: ', String(node.self), ',');
generator.breakLine();
generator.push(
'isLowerBound: ', String(node.isLowerBound), ',');
generator.breakLine();
// Node children.
var children = node.children;
generator.push('children: ');
generator.formatMultiLineList(
children,
function(singleDimensionChildren, dimension) {
generator.formatMultiLineList(
tr.b.mapValues(singleDimensionChildren),
function(child, childIndex) {
withChild(child, dimension, function() {
formatExpectedTreeStructureRecursively(child);
});
});
});
});
generator.breakLine();
generator.push('}');
}
formatExpectedTreeStructureRecursively(root, label);
}
// Build and format the three multi-dimensional views.
formatExpectedTreeStructure(
builder.buildTopDownTreeView(), 'Top-down tree view');
generator.push(',');
generator.breakLine();
formatExpectedTreeStructure(
builder.buildTopDownHeavyView(), 'Top-down heavy view');
generator.push(',');
generator.breakLine();
formatExpectedTreeStructure(
builder.buildBottomUpHeavyView(), 'Bottom-up heavy view');
generator.push(');');
});
});
tr.c.TestUtils.addSourceListing(this, generator.build());
throw new Error('This error is thrown to prevent accidentally ' +
'checking in a test generator instead of an actual test.');
});
}
builderTest('zeroDimensions_noPaths', 0 /* dimensions */,
[],
{ // Top-down tree view.
title: [],
total: 0,
self: 0,
isLowerBound: true,
children: []
},
{ // Top-down heavy view.
title: [],
total: 0,
self: 0,
isLowerBound: true,
children: []
},
{ // Bottom-up heavy view.
title: [],
total: 0,
self: 0,
isLowerBound: true,
children: []
});
builderTest('zeroDimensions_withPaths', 0 /* dimensions */,
[
{ path: [], value: 2, kind: SELF },
{ path: [], value: 3, kind: TOTAL },
{ path: [], value: 4, kind: SELF },
{ path: [], value: 5, kind: TOTAL }
],
{ // Top-down tree view.
title: [],
total: 8,
self: 6,
isLowerBound: false,
children: []
},
{ // Top-down heavy view.
title: [],
total: 8,
self: 6,
isLowerBound: false,
children: []
},
{ // Bottom-up heavy view.
title: [],
total: 8,
self: 6,
isLowerBound: false,
children: []
});
builderTest('oneDimension_noPaths', 1 /* dimensions */,
[],
{ // Top-down tree view.
title: [undefined],
total: 0,
self: 0,
isLowerBound: true,
children: [
[]
]
},
{ // Top-down heavy view.
title: [undefined],
total: 0,
self: 0,
isLowerBound: true,
children: [
[]
]
},
{ // Bottom-up heavy view.
title: [undefined],
total: 0,
self: 0,
isLowerBound: true,
children: [
[]
]
});
builderTest('oneDimension_zeroLengthPath', 1 /* dimensions */,
[
{ path: [[]], value: 42, kind: SELF }
],
{ // Top-down tree view.
title: [undefined],
total: 42,
self: 42,
isLowerBound: false,
children: [
[]
]
},
{ // Top-down heavy view.
title: [undefined],
total: 42,
self: 42,
isLowerBound: false,
children: [
[]
]
},
{ // Top-down heavy view.
title: [undefined],
total: 42,
self: 42,
isLowerBound: false,
children: [
[]
]
});
builderTest('oneDimension_noRecursion', 1 /* dimensions */,
[
{ path: [['A', 'B', 'C']], value: 10, kind: SELF },
{ path: [['A', 'B']], value: 20, kind: SELF },
{ path: [['B', 'D']], value: 30, kind: SELF },
{ path: [['A', 'B', 'D']], value: 40, kind: SELF },
{ path: [['A', 'C']], value: 50, kind: SELF },
{ path: [[]], value: 60, kind: SELF }
],
{ // Top-down tree view.
title: [undefined],
total: 210,
self: 60,
isLowerBound: false,
children: [
[
{ // A.
title: ['A'],
total: 120,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B.
title: ['B'],
total: 70,
self: 20,
isLowerBound: false,
children: [
[
{ // A -> B -> C.
title: ['C'],
total: 10,
self: 10,
isLowerBound: false,
children: [
[]
]
},
{ // A -> B -> D.
title: ['D'],
total: 40,
self: 40,
isLowerBound: false,
children: [
[]
]
}
]
]
},
{ // A -> C.
title: ['C'],
total: 50,
self: 50,
isLowerBound: false,
children: [
[]
]
}
]
]
},
{ // B.
title: ['B'],
total: 30,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> D.
title: ['D'],
total: 30,
self: 30,
isLowerBound: false,
children: [
[]
]
}
]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined],
total: 210,
self: 60,
isLowerBound: false,
children: [
[
{ // A.
title: ['A'],
total: 120,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B.
title: ['B'],
total: 70,
self: 20,
isLowerBound: true,
children: [
[
{ // A -> B -> C.
title: ['C'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[]
]
},
{ // A -> B -> D.
title: ['D'],
total: 40,
self: 40,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // A -> C.
title: ['C'],
total: 50,
self: 50,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // B.
title: ['B'],
total: 100,
self: 20,
isLowerBound: true,
children: [
[
{ // B -> C.
title: ['C'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[]
]
},
{ // B -> D.
title: ['D'],
total: 70,
self: 70,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // C.
title: ['C'],
total: 60,
self: 60,
isLowerBound: true,
children: [
[]
]
},
{ // D.
title: ['D'],
total: 70,
self: 70,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined],
total: 210,
self: 60,
isLowerBound: false,
children: [
[
{ // A.
title: ['A'],
total: 120,
self: 0,
isLowerBound: true,
children: [
[]
]
},
{ // B.
title: ['B'],
total: 100,
self: 20,
isLowerBound: true,
children: [
[
{ // B -> A.
title: ['A'],
total: 70,
self: 20,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // C.
title: ['C'],
total: 60,
self: 60,
isLowerBound: true,
children: [
[
{ // C -> B.
title: ['B'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[
{ // C -> B -> A.
title: ['A'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // C -> A.
title: ['A'],
total: 50,
self: 50,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // D.
title: ['D'],
total: 70,
self: 70,
isLowerBound: true,
children: [
[
{ // D -> B.
title: ['B'],
total: 70,
self: 70,
isLowerBound: true,
children: [
[
{ // D -> B -> A.
title: ['A'],
total: 40,
self: 40,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
});
builderTest('oneDimension_simpleRecursion', 1 /* dimensions */,
[
{ path: [['A']], value: 10, kind: SELF },
{ path: [['A', 'A', 'A']], value: 20, kind: SELF },
{ path: [['A', 'A']], value: 30, kind: SELF },
{ path: [['A', 'A', 'A', 'A']], value: 40, kind: SELF }
],
{ // Top-down tree view.
title: [undefined],
total: 100,
self: 0,
isLowerBound: true,
children: [
[
{ // A.
title: ['A'],
total: 100,
self: 10,
isLowerBound: false,
children: [
[
{ // A -> A.
title: ['A'],
total: 90,
self: 30,
isLowerBound: false,
children: [
[
{ // A -> A -> A.
title: ['A'],
total: 60,
self: 20,
isLowerBound: false,
children: [
[
{ // A -> A -> A -> A.
title: ['A'],
total: 40,
self: 40,
isLowerBound: false,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined],
total: 100,
self: 0,
isLowerBound: true,
children: [
[
{ // A.
title: ['A'],
total: 100,
self: 100,
isLowerBound: true,
children: [
[
{ // A -> A.
title: ['A'],
total: 90,
self: 90,
isLowerBound: true,
children: [
[
{ // A -> A -> A.
title: ['A'],
total: 60,
self: 60,
isLowerBound: true,
children: [
[
{ // A -> A -> A -> A.
title: ['A'],
total: 40,
self: 40,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined],
total: 100,
self: 0,
isLowerBound: true,
children: [
[
{ // A.
title: ['A'],
total: 100,
self: 100,
isLowerBound: true,
children: [
[
{ // A -> A.
title: ['A'],
total: 90,
self: 90,
isLowerBound: true,
children: [
[
{ // A -> A -> A.
title: ['A'],
total: 60,
self: 60,
isLowerBound: true,
children: [
[
{ // A -> A -> A -> A.
title: ['A'],
total: 40,
self: 40,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
});
builderTest('oneDimension_complexRecursion', 1 /* dimensions */,
[
{ path: [['A', 'B', 'C']], value: 10, kind: SELF },
{ path: [['A', 'D', 'B', 'C', 'A', 'B', 'C']], value: 20, kind: SELF },
{ path: [['A', 'D', 'B', 'C', 'A', 'B', 'D']], value: 30, kind: SELF },
{ path: [['C', 'B', 'C']], value: 40, kind: SELF },
{ path: [['C', 'B', 'C', 'B', 'C']], value: 50, kind: SELF }
],
{ // Top-down tree view.
title: [undefined],
total: 150,
self: 0,
isLowerBound: true,
children: [
[
{ // A.
title: ['A'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B.
title: ['B'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B -> C.
title: ['C'],
total: 10,
self: 10,
isLowerBound: false,
children: [
[]
]
}
]
]
},
{ // A -> D.
title: ['D'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> D -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> D -> B -> C.
title: ['C'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> D -> B -> C -> A.
title: ['A'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> D -> B -> C -> A -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> D -> B -> C -> A ->
// B -> C.
title: ['C'],
total: 20,
self: 20,
isLowerBound: false,
children: [
[]
]
},
{ // A -> D -> B -> C -> A ->
// B -> D.
title: ['D'],
total: 30,
self: 30,
isLowerBound: false,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // C.
title: ['C'],
total: 90,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> B.
title: ['B'],
total: 90,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> B -> C.
title: ['C'],
total: 90,
self: 40,
isLowerBound: false,
children: [
[
{ // C -> B -> C -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> B -> C -> B -> C.
title: ['C'],
total: 50,
self: 50,
isLowerBound: false,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined],
total: 150,
self: 0,
isLowerBound: true,
children: [
[
{ // A.
title: ['A'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B.
title: ['B'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B -> C.
title: ['C'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[]
]
},
{ // A -> B -> D.
title: ['D'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // A -> D.
title: ['D'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> D -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> D -> B -> C.
title: ['C'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> D -> B -> C -> A.
title: ['A'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> D -> B -> C -> A -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> D -> B -> C -> A ->
// B -> C.
title: ['C'],
total: 20,
self: 20,
isLowerBound: true,
children: [
[]
]
},
{ // A -> D -> B -> C -> A ->
// B -> D.
title: ['D'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // B.
title: ['B'],
total: 150,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> C.
title: ['C'],
total: 150,
self: 120,
isLowerBound: true,
children: [
[
{ // B -> C -> A.
title: ['A'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> C -> A -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> C -> A -> B -> C.
title: ['C'],
total: 20,
self: 20,
isLowerBound: true,
children: [
[]
]
},
{ // B -> C -> A -> B -> D.
title: ['D'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
},
{ // B -> C -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> C -> B -> C.
title: ['C'],
total: 50,
self: 50,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
},
{ // B -> D.
title: ['D'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // C.
title: ['C'],
total: 150,
self: 120,
isLowerBound: true,
children: [
[
{ // C -> A.
title: ['A'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> A -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> A -> B -> C.
title: ['C'],
total: 20,
self: 20,
isLowerBound: true,
children: [
[]
]
},
{ // C -> A -> B -> D.
title: ['D'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
},
{ // C -> B.
title: ['B'],
total: 90,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> B -> C.
title: ['C'],
total: 90,
self: 90,
isLowerBound: true,
children: [
[
{ // C -> B -> C -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> B -> C -> B -> C.
title: ['C'],
total: 50,
self: 50,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // D.
title: ['D'],
total: 50,
self: 30,
isLowerBound: true,
children: [
[
{ // D -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // D -> B -> C.
title: ['C'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // D -> B -> C -> A.
title: ['A'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // D -> B -> C -> A -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // D -> B -> C -> A -> B -> C.
title: ['C'],
total: 20,
self: 20,
isLowerBound: true,
children: [
[]
]
},
{ // D -> B -> C -> A -> B -> D.
title: ['D'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined],
total: 150,
self: 0,
isLowerBound: true,
children: [
[
{ // A.
title: ['A'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> C.
title: ['C'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> C -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> C -> B -> D.
title: ['D'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> C -> B -> D -> A.
title: ['A'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // B.
title: ['B'],
total: 150,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A.
title: ['A'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A -> C.
title: ['C'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A -> C -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A -> C -> B -> D.
title: ['D'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A -> C -> B -> D -> A.
title: ['A'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // B -> D.
title: ['D'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> D -> A.
title: ['A'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // B -> C.
title: ['C'],
total: 90,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> C -> B.
title: ['B'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> C -> B -> C.
title: ['C'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
},
{ // C.
title: ['C'],
total: 150,
self: 120,
isLowerBound: true,
children: [
[
{ // C -> B.
title: ['B'],
total: 150,
self: 120,
isLowerBound: true,
children: [
[
{ // C -> B -> A.
title: ['A'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[
{ // C -> B -> A -> C.
title: ['C'],
total: 20,
self: 20,
isLowerBound: true,
children: [
[
{ // C -> B -> A -> C -> B.
title: ['B'],
total: 20,
self: 20,
isLowerBound: true,
children: [
[
{ // C -> B -> A -> C -> B -> D.
title: ['D'],
total: 20,
self: 20,
isLowerBound: true,
children: [
[
{ // C -> B -> A -> C -> B ->
// D -> A.
title: ['A'],
total: 20,
self: 20,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // C -> B -> D.
title: ['D'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> B -> D -> A.
title: ['A'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // C -> B -> C.
title: ['C'],
total: 90,
self: 90,
isLowerBound: true,
children: [
[
{ // C -> B -> C -> B.
title: ['B'],
total: 50,
self: 50,
isLowerBound: true,
children: [
[
{ // C -> B -> C -> B -> C.
title: ['C'],
total: 50,
self: 50,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
},
{ // D.
title: ['D'],
total: 50,
self: 30,
isLowerBound: true,
children: [
[
{ // D -> A.
title: ['A'],
total: 50,
self: 0,
isLowerBound: true,
children: [
[]
]
},
{ // D -> B.
title: ['B'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[
{ // D -> B -> A.
title: ['A'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[
{ // D -> B -> A -> C.
title: ['C'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[
{ // D -> B -> A -> C -> B.
title: ['B'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[
{ // D -> B -> A -> C -> B -> D.
title: ['D'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[
{ // D -> B -> A -> C -> B ->
// D -> A.
title: ['A'],
total: 30,
self: 30,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
}
]
]
}
]
]
}
]
]
}
]
]
});
builderTest('oneDimension_withTotalSizes', 1 /* dimensions */,
[
{ path: [['B', 'C']], value: 10, kind: TOTAL },
{ path: [['B', 'C', 'D']], value: 5, kind: TOTAL },
{ path: [['B']], value: 15, kind: SELF },
{ path: [['B']], value: 20, kind: TOTAL },
{ path: [['B', 'D']], value: 40, kind: SELF },
{ path: [['C']], value: 50, kind: TOTAL }
],
{ // Top-down tree view.
title: [undefined],
total: 115,
self: 0,
isLowerBound: true,
children: [
[
{ // B.
title: ['B'],
total: 65,
self: 15,
isLowerBound: false,
children: [
[
{ // B -> C.
title: ['C'],
total: 10,
self: 0,
isLowerBound: false,
children: [
[
{ // B -> C -> D.
title: ['D'],
total: 5,
self: 0,
isLowerBound: false,
children: [
[]
]
}
]
]
},
{ // B -> D.
title: ['D'],
total: 40,
self: 40,
isLowerBound: false,
children: [
[]
]
}
]
]
},
{ // C.
title: ['C'],
total: 50,
self: 0,
isLowerBound: false,
children: [
[]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined],
total: 115,
self: 0,
isLowerBound: true,
children: [
[
{ // B.
title: ['B'],
total: 65,
self: 15,
isLowerBound: true,
children: [
[
{ // B -> C.
title: ['C'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> C -> D.
title: ['D'],
total: 5,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // B -> D.
title: ['D'],
total: 40,
self: 40,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // C.
title: ['C'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> D.
title: ['D'],
total: 5,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // D.
title: ['D'],
total: 45,
self: 40,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined],
total: 115,
self: 0,
isLowerBound: true,
children: [
[
{ // B.
title: ['B'],
total: 65,
self: 15,
isLowerBound: true,
children: [
[]
]
},
{ // C.
title: ['C'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> B.
title: ['B'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // D.
title: ['D'],
total: 45,
self: 40,
isLowerBound: true,
children: [
[
{ // D -> C.
title: ['C'],
total: 5,
self: 0,
isLowerBound: true,
children: [
[
{ // D -> C -> B.
title: ['B'],
total: 5,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // D -> B.
title: ['B'],
total: 40,
self: 40,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
});
builderTest('oneDimension_protoTitle', 1 /* dimensions */,
[
{ path: [['__proto__']], value: 45, kind: SELF },
{ path: [['A']], value: 18, kind: SELF },
{ path: [['A', '__proto__']], value: 89, kind: TOTAL }
],
{ // Top-down tree view.
title: [undefined],
total: 152,
self: 0,
isLowerBound: true,
children: [
[
{ // __proto__.
title: ['__proto__'],
total: 45,
self: 45,
isLowerBound: false,
children: [
[]
]
},
{ // A.
title: ['A'],
total: 107,
self: 18,
isLowerBound: false,
children: [
[
{ // A -> __proto__.
title: ['__proto__'],
total: 89,
self: 0,
isLowerBound: false,
children: [
[]
]
}
]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined],
total: 152,
self: 0,
isLowerBound: true,
children: [
[
{ // __proto__.
title: ['__proto__'],
total: 134,
self: 45,
isLowerBound: true,
children: [
[]
]
},
{ // A.
title: ['A'],
total: 107,
self: 18,
isLowerBound: true,
children: [
[
{ // A -> __proto__.
title: ['__proto__'],
total: 89,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined],
total: 152,
self: 0,
isLowerBound: true,
children: [
[
{ // __proto__.
title: ['__proto__'],
total: 134,
self: 45,
isLowerBound: true,
children: [
[
{ // __proto__ -> A.
title: ['A'],
total: 89,
self: 0,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // A.
title: ['A'],
total: 107,
self: 18,
isLowerBound: true,
children: [
[]
]
}
]
]
});
// See tracing/tracing/base/multi_dimensional_view.html
// (MultiDimensionalViewBuilder.addDimensionToTopDownHeavyViewNode_ and
// MultiDimensionalViewBuilder.addDimensionToBottomUpHeavyViewNode_
// documentation).
builderTest('oneDimension_documentationExample', 1 /* dimensions */,
[
{ path: [['A']], value: 10, kind: SELF },
{ path: [['A']], value: 30, kind: TOTAL },
{ path: [['A', 'B']], value: 1, kind: SELF },
{ path: [['A', 'B', 'A']], value: 3, kind: SELF },
{ path: [['A', 'B', 'A']], value: 8, kind: TOTAL },
{ path: [['A', 'B', 'C']], value: 2, kind: SELF },
{ path: [['A', 'B', 'C']], value: 7, kind: TOTAL },
{ path: [['B']], value: 12, kind: SELF },
{ path: [['B']], value: 18, kind: TOTAL }
],
{ // Top-down tree view.
title: [undefined],
total: 48,
self: 0,
isLowerBound: true,
children: [
[
{ // A.
title: ['A'],
total: 30,
self: 10,
isLowerBound: false,
children: [
[
{ // A -> B.
title: ['B'],
total: 16,
self: 1,
isLowerBound: false,
children: [
[
{ // A -> B -> A.
title: ['A'],
total: 8,
self: 3,
isLowerBound: false,
children: [
[]
]
},
{ // A -> B -> C.
title: ['C'],
total: 7,
self: 2,
isLowerBound: false,
children: [
[]
]
}
]
]
}
]
]
},
{ // B.
title: ['B'],
total: 18,
self: 12,
isLowerBound: false,
children: [
[]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined],
total: 48,
self: 0,
isLowerBound: true,
children: [
[
{ // A.
title: ['A'],
total: 30,
self: 13,
isLowerBound: true,
children: [
[
{ // A -> B.
title: ['B'],
total: 16,
self: 1,
isLowerBound: true,
children: [
[
{ // A -> B -> A.
title: ['A'],
total: 8,
self: 3,
isLowerBound: true,
children: [
[]
]
},
{ // A -> B -> C.
title: ['C'],
total: 7,
self: 2,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
},
{ // B.
title: ['B'],
total: 34,
self: 13,
isLowerBound: true,
children: [
[
{ // B -> A.
title: ['A'],
total: 8,
self: 3,
isLowerBound: true,
children: [
[]
]
},
{ // B -> C.
title: ['C'],
total: 7,
self: 2,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // C.
title: ['C'],
total: 7,
self: 2,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined],
total: 48,
self: 0,
isLowerBound: true,
children: [
[
{ // A.
title: ['A'],
total: 30,
self: 13,
isLowerBound: true,
children: [
[
{ // A -> B.
title: ['B'],
total: 8,
self: 3,
isLowerBound: true,
children: [
[
{ // A -> B -> A.
title: ['A'],
total: 8,
self: 3,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
},
{ // B.
title: ['B'],
total: 34,
self: 13,
isLowerBound: true,
children: [
[
{ // B -> A.
title: ['A'],
total: 16,
self: 1,
isLowerBound: true,
children: [
[]
]
}
]
]
},
{ // C.
title: ['C'],
total: 7,
self: 2,
isLowerBound: true,
children: [
[
{ // C -> B.
title: ['B'],
total: 7,
self: 2,
isLowerBound: true,
children: [
[
{ // C -> B -> A.
title: ['A'],
total: 7,
self: 2,
isLowerBound: true,
children: [
[]
]
}
]
]
}
]
]
}
]
]
});
builderTest('twoDimensions_noPaths', 2 /* dimensions */,
[],
{ // Top-down tree view.
title: [undefined, undefined],
total: 0,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // Top-down heavy view.
title: [undefined, undefined],
total: 0,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // Bottom-up heavy view.
title: [undefined, undefined],
total: 0,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
});
// See tracing/tracing/base/multi_dimensional_view.html
// (MultiDimensionalViewNode.finalizeTotalValues_ documentation).
builderTest('twoDimensions_totalCalculation', 2 /* dimensions */,
[
{ path: [[], []], value: 10, kind: SELF },
{ path: [['A'], []], value: 21, kind: SELF },
{ path: [['A'], []], value: 30, kind: TOTAL },
{ path: [['B'], []], value: 25, kind: SELF },
{ path: [['B'], []], value: 32, kind: TOTAL },
{ path: [[], ['1']], value: 3, kind: SELF },
{ path: [[], ['1']], value: 15, kind: TOTAL },
{ path: [[], ['2']], value: 40, kind: SELF },
{ path: [[], ['2']], value: 41, kind: TOTAL }
],
{ // Top-down tree view.
title: [undefined, undefined],
total: 115,
self: 10,
isLowerBound: false,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 30,
self: 21,
isLowerBound: false,
children: [
[],
[]
]
},
{ // B, *.
title: ['B', undefined],
total: 32,
self: 25,
isLowerBound: false,
children: [
[],
[]
]
}
],
[
{ // *, 1.
title: [undefined, '1'],
total: 15,
self: 3,
isLowerBound: false,
children: [
[],
[]
]
},
{ // *, 2.
title: [undefined, '2'],
total: 41,
self: 40,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined, undefined],
total: 115,
self: 10,
isLowerBound: false,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 30,
self: 21,
isLowerBound: true,
children: [
[],
[]
]
},
{ // B, *.
title: ['B', undefined],
total: 32,
self: 25,
isLowerBound: true,
children: [
[],
[]
]
}
],
[
{ // *, 1.
title: [undefined, '1'],
total: 15,
self: 3,
isLowerBound: true,
children: [
[],
[]
]
},
{ // *, 2.
title: [undefined, '2'],
total: 41,
self: 40,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined, undefined],
total: 115,
self: 10,
isLowerBound: false,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 30,
self: 21,
isLowerBound: true,
children: [
[],
[]
]
},
{ // B, *.
title: ['B', undefined],
total: 32,
self: 25,
isLowerBound: true,
children: [
[],
[]
]
}
],
[
{ // *, 1.
title: [undefined, '1'],
total: 15,
self: 3,
isLowerBound: true,
children: [
[],
[]
]
},
{ // *, 2.
title: [undefined, '2'],
total: 41,
self: 40,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
});
// See tracing/tracing/base/multi_dimensional_view.html
// (MultiDimensionalViewNode documentation).
builderTest('twoDimensions_documentationExample1', 2 /* dimensions */,
[
{ path: [['A', 'B'], ['T1', 'T2']], value: 1, kind: TOTAL },
{ path: [['A', 'B'], ['T1']], value: 2, kind: TOTAL },
{ path: [['A', 'B'], []], value: 4, kind: TOTAL },
{ path: [['A'], ['T1', 'T2']], value: 10, kind: TOTAL },
{ path: [['A'], ['T1']], value: 20, kind: TOTAL },
{ path: [['A'], []], value: 40, kind: TOTAL },
{ path: [[], ['T1', 'T2']], value: 100, kind: TOTAL },
{ path: [[], ['T1']], value: 200, kind: TOTAL },
{ path: [[], []], value: 400, kind: TOTAL }
],
{ // Top-down tree view.
title: [undefined, undefined],
total: 400,
self: 0,
isLowerBound: false,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 40,
self: 0,
isLowerBound: false,
children: [
[
{ // A -> B, *.
title: ['B', undefined],
total: 4,
self: 0,
isLowerBound: false,
children: [
[],
[
{ // A -> B, T1.
id: '#0',
title: ['B', 'T1'],
total: 2,
self: 0,
isLowerBound: false,
children: [
[],
[
{ // A -> B, T1 -> T2.
id: '#1',
title: ['B', 'T2'],
total: 1,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // A, T1.
id: '#2',
title: ['A', 'T1'],
total: 20,
self: 0,
isLowerBound: false,
children: [
[
'#0' // A -> B, T1.
],
[
{ // A, T1 -> T2.
id: '#3',
title: ['A', 'T2'],
total: 10,
self: 0,
isLowerBound: false,
children: [
[
'#1' // A -> B, T1 -> T2.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, T1.
title: [undefined, 'T1'],
total: 200,
self: 0,
isLowerBound: false,
children: [
[
'#2' // A, T1.
],
[
{ // *, T1 -> T2.
title: [undefined, 'T2'],
total: 100,
self: 0,
isLowerBound: false,
children: [
[
'#3' // A, T1 -> T2.
],
[]
]
}
]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined, undefined],
total: 400,
self: 0,
isLowerBound: false,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 40,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B, *.
title: ['B', undefined],
total: 4,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B, T1.
id: '#0',
title: ['B', 'T1'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B, T1 -> T2.
id: '#1',
title: ['B', 'T2'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // A -> B, T2.
id: '#2',
title: ['B', 'T2'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // A, T1.
id: '#3',
title: ['A', 'T1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#0' // A -> B, T1.
],
[
{ // A, T1 -> T2.
id: '#4',
title: ['A', 'T2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#1' // A -> B, T1 -> T2.
],
[]
]
}
]
]
},
{ // A, T2.
id: '#5',
title: ['A', 'T2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#2' // A -> B, T2.
],
[]
]
}
]
]
},
{ // B, *.
title: ['B', undefined],
total: 4,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B, T1.
id: '#6',
title: ['B', 'T1'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B, T1 -> T2.
id: '#7',
title: ['B', 'T2'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // B, T2.
id: '#8',
title: ['B', 'T2'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // *, T1.
title: [undefined, 'T1'],
total: 200,
self: 0,
isLowerBound: true,
children: [
[
'#3', // A, T1.
'#6' // B, T1.
],
[
{ // *, T1 -> T2.
title: [undefined, 'T2'],
total: 100,
self: 0,
isLowerBound: true,
children: [
[
'#4', // A, T1 -> T2.
'#7' // B, T1 -> T2.
],
[]
]
}
]
]
},
{ // *, T2.
title: [undefined, 'T2'],
total: 100,
self: 0,
isLowerBound: true,
children: [
[
'#5', // A, T2.
'#8' // B, T2.
],
[]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined, undefined],
total: 400,
self: 0,
isLowerBound: false,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 40,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A, T1.
id: '#0',
title: ['A', 'T1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // A, T2.
id: '#1',
title: ['A', 'T2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A, T2 -> T1.
id: '#2',
title: ['A', 'T1'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
},
{ // B, *.
title: ['B', undefined],
total: 4,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A, *.
title: ['A', undefined],
total: 4,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> A, T1.
id: '#3',
title: ['A', 'T1'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // B -> A, T2.
id: '#4',
title: ['A', 'T2'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> A, T2 -> T1.
id: '#5',
title: ['A', 'T1'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // B, T1.
id: '#6',
title: ['B', 'T1'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[
'#3' // B -> A, T1.
],
[]
]
},
{ // B, T2.
id: '#7',
title: ['B', 'T2'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[
'#4' // B -> A, T2.
],
[
{ // B, T2 -> T1.
id: '#8',
title: ['B', 'T1'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[
'#5' // B -> A, T2 -> T1.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, T1.
title: [undefined, 'T1'],
total: 200,
self: 0,
isLowerBound: true,
children: [
[
'#0', // A, T1.
'#6' // B, T1.
],
[]
]
},
{ // *, T2.
title: [undefined, 'T2'],
total: 100,
self: 0,
isLowerBound: true,
children: [
[
'#1', // A, T2.
'#7' // B, T2.
],
[
{ // *, T2 -> T1.
title: [undefined, 'T1'],
total: 100,
self: 0,
isLowerBound: true,
children: [
[
'#2', // A, T2 -> T1.
'#8' // B, T2 -> T1.
],
[]
]
}
]
]
}
]
]
});
// See tracing/tracing/base/multi_dimensional_view.html
// (MultiDimensionalViewBuilder documentation).
builderTest('twoDimensions_documentationExample2', 2 /* dimensions */,
[
{ path: [['Saturday'], ['Cooking']], value: 1, kind: SELF },
{ path: [['Saturday'], ['Sports', 'Football']], value: 2, kind: SELF },
{ path: [['Sunday'], ['Sports', 'Basketball']], value: 3, kind: SELF }
],
{ // Top-down tree view.
title: [undefined, undefined],
total: 6,
self: 0,
isLowerBound: true,
children: [
[
{ // Saturday, *.
title: ['Saturday', undefined],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Saturday, Cooking.
id: '#0',
title: ['Saturday', 'Cooking'],
total: 1,
self: 1,
isLowerBound: false,
children: [
[],
[]
]
},
{ // Saturday, Sports.
id: '#1',
title: ['Saturday', 'Sports'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Saturday, Sports -> Football.
id: '#2',
title: ['Saturday', 'Football'],
total: 2,
self: 2,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
}
]
]
},
{ // Sunday, *.
title: ['Sunday', undefined],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Sunday, Sports.
id: '#3',
title: ['Sunday', 'Sports'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Sunday, Sports -> Basketball.
id: '#4',
title: ['Sunday', 'Basketball'],
total: 3,
self: 3,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, Cooking.
title: [undefined, 'Cooking'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[
'#0' // Saturday, Cooking.
],
[]
]
},
{ // *, Sports.
title: [undefined, 'Sports'],
total: 5,
self: 0,
isLowerBound: true,
children: [
[
'#1', // Saturday, Sports.
'#3' // Sunday, Sports.
],
[
{ // *, Sports -> Football.
title: [undefined, 'Football'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[
'#2' // Saturday, Sports -> Football.
],
[]
]
},
{ // *, Sports -> Basketball.
title: [undefined, 'Basketball'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[
'#4' // Sunday, Sports -> Basketball.
],
[]
]
}
]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined, undefined],
total: 6,
self: 0,
isLowerBound: true,
children: [
[
{ // Saturday, *.
title: ['Saturday', undefined],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Saturday, Cooking.
id: '#0',
title: ['Saturday', 'Cooking'],
total: 1,
self: 1,
isLowerBound: true,
children: [
[],
[]
]
},
{ // Saturday, Sports.
id: '#1',
title: ['Saturday', 'Sports'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Saturday, Sports -> Football.
id: '#2',
title: ['Saturday', 'Football'],
total: 2,
self: 2,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // Saturday, Football.
id: '#3',
title: ['Saturday', 'Football'],
total: 2,
self: 2,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // Sunday, *.
title: ['Sunday', undefined],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Sunday, Sports.
id: '#4',
title: ['Sunday', 'Sports'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Sunday, Sports -> Basketball.
id: '#5',
title: ['Sunday', 'Basketball'],
total: 3,
self: 3,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // Sunday, Basketball.
id: '#6',
title: ['Sunday', 'Basketball'],
total: 3,
self: 3,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // *, Cooking.
title: [undefined, 'Cooking'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[
'#0' // Saturday, Cooking.
],
[]
]
},
{ // *, Sports.
title: [undefined, 'Sports'],
total: 5,
self: 0,
isLowerBound: true,
children: [
[
'#1', // Saturday, Sports.
'#4' // Sunday, Sports.
],
[
{ // *, Sports -> Football.
title: [undefined, 'Football'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[
'#2' // Saturday, Sports -> Football.
],
[]
]
},
{ // *, Sports -> Basketball.
title: [undefined, 'Basketball'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[
'#5' // Sunday, Sports -> Basketball.
],
[]
]
}
]
]
},
{ // *, Football.
title: [undefined, 'Football'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[
'#3' // Saturday, Football.
],
[]
]
},
{ // *, Basketball.
title: [undefined, 'Basketball'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[
'#6' // Sunday, Basketball.
],
[]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined, undefined],
total: 6,
self: 0,
isLowerBound: true,
children: [
[
{ // Saturday, *.
title: ['Saturday', undefined],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Saturday, Cooking.
id: '#0',
title: ['Saturday', 'Cooking'],
total: 1,
self: 1,
isLowerBound: true,
children: [
[],
[]
]
},
{ // Saturday, Sports.
id: '#1',
title: ['Saturday', 'Sports'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // Saturday, Football.
id: '#2',
title: ['Saturday', 'Football'],
total: 2,
self: 2,
isLowerBound: true,
children: [
[],
[
{ // Saturday, Football -> Sports.
id: '#3',
title: ['Saturday', 'Sports'],
total: 2,
self: 2,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
},
{ // Sunday, *.
title: ['Sunday', undefined],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Sunday, Sports.
id: '#4',
title: ['Sunday', 'Sports'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // Sunday, Basketball.
id: '#5',
title: ['Sunday', 'Basketball'],
total: 3,
self: 3,
isLowerBound: true,
children: [
[],
[
{ // Sunday, Basketball -> Sports.
id: '#6',
title: ['Sunday', 'Sports'],
total: 3,
self: 3,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, Cooking.
title: [undefined, 'Cooking'],
total: 1,
self: 0,
isLowerBound: true,
children: [
[
'#0' // Saturday, Cooking.
],
[]
]
},
{ // *, Sports.
title: [undefined, 'Sports'],
total: 5,
self: 0,
isLowerBound: true,
children: [
[
'#1', // Saturday, Sports.
'#4' // Sunday, Sports.
],
[]
]
},
{ // *, Football.
title: [undefined, 'Football'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[
'#2' // Saturday, Football.
],
[
{ // *, Football -> Sports.
title: [undefined, 'Sports'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[
'#3' // Saturday, Football -> Sports.
],
[]
]
}
]
]
},
{ // *, Basketball.
title: [undefined, 'Basketball'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[
'#5' // Sunday, Basketball.
],
[
{ // *, Basketball -> Sports.
title: [undefined, 'Sports'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[
'#6' // Sunday, Basketball -> Sports.
],
[]
]
}
]
]
}
]
]
});
// See https://goo.gl/KY7zVE.
builderTest('twoDimensions_heapDumpExample', 2 /* dimensions */,
[
{ path: [['BrMain', 'Init'], ['T']], value: 151, kind: TOTAL },
{ path: [['BrMain', 'Init'], ['W']], value: 83, kind: TOTAL },
{ path: [['BrMain', 'Init'], []], value: 242, kind: TOTAL },
{ path: [['BrMain', 'MsgLp'], ['T']], value: 307, kind: TOTAL },
{ path: [['BrMain', 'MsgLp'], ['V']], value: 281, kind: TOTAL },
{ path: [['BrMain', 'MsgLp'], []], value: 601, kind: TOTAL },
{ path: [['RdMain', 'RTask'], ['T']], value: 211, kind: TOTAL },
{ path: [['RdMain', 'RTask'], ['W']], value: 337, kind: TOTAL },
{ path: [['RdMain', 'RTask'], []], value: 556, kind: TOTAL },
{ path: [[], ['T']], value: 698, kind: TOTAL },
{ path: [[], ['V']], value: 340, kind: TOTAL },
{ path: [[], ['W']], value: 461, kind: TOTAL },
{ path: [[], []], value: 1538, kind: TOTAL },
{ path: [['BrMain'], ['T']], value: 465, kind: TOTAL },
{ path: [['BrMain'], ['V']], value: 297, kind: TOTAL },
{ path: [['BrMain'], ['W']], value: 96, kind: TOTAL },
{ path: [['BrMain'], []], value: 876, kind: TOTAL },
{ path: [['RdMain'], ['T']], value: 229, kind: TOTAL },
{ path: [['RdMain'], ['W']], value: 355, kind: TOTAL },
{ path: [['RdMain'], []], value: 628, kind: TOTAL }
],
{ // Top-down tree view.
title: [undefined, undefined],
total: 1538,
self: 0,
isLowerBound: false,
children: [
[
{ // BrMain, *.
title: ['BrMain', undefined],
total: 876,
self: 0,
isLowerBound: false,
children: [
[
{ // BrMain -> Init, *.
title: ['Init', undefined],
total: 242,
self: 0,
isLowerBound: false,
children: [
[],
[
{ // BrMain -> Init, T.
id: '#0',
title: ['Init', 'T'],
total: 151,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
},
{ // BrMain -> Init, W.
id: '#1',
title: ['Init', 'W'],
total: 83,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
},
{ // BrMain -> MsgLp, *.
title: ['MsgLp', undefined],
total: 601,
self: 0,
isLowerBound: false,
children: [
[],
[
{ // BrMain -> MsgLp, T.
id: '#2',
title: ['MsgLp', 'T'],
total: 307,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
},
{ // BrMain -> MsgLp, V.
id: '#3',
title: ['MsgLp', 'V'],
total: 281,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
}
],
[
{ // BrMain, T.
id: '#4',
title: ['BrMain', 'T'],
total: 465,
self: 0,
isLowerBound: false,
children: [
[
'#0', // BrMain -> Init, T.
'#2' // BrMain -> MsgLp, T.
],
[]
]
},
{ // BrMain, V.
id: '#5',
title: ['BrMain', 'V'],
total: 297,
self: 0,
isLowerBound: false,
children: [
[
'#3' // BrMain -> MsgLp, V.
],
[]
]
},
{ // BrMain, W.
id: '#6',
title: ['BrMain', 'W'],
total: 96,
self: 0,
isLowerBound: false,
children: [
[
'#1' // BrMain -> Init, W.
],
[]
]
}
]
]
},
{ // RdMain, *.
title: ['RdMain', undefined],
total: 628,
self: 0,
isLowerBound: false,
children: [
[
{ // RdMain -> RTask, *.
title: ['RTask', undefined],
total: 556,
self: 0,
isLowerBound: false,
children: [
[],
[
{ // RdMain -> RTask, T.
id: '#7',
title: ['RTask', 'T'],
total: 211,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
},
{ // RdMain -> RTask, W.
id: '#8',
title: ['RTask', 'W'],
total: 337,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
}
],
[
{ // RdMain, T.
id: '#9',
title: ['RdMain', 'T'],
total: 229,
self: 0,
isLowerBound: false,
children: [
[
'#7' // RdMain -> RTask, T.
],
[]
]
},
{ // RdMain, W.
id: '#10',
title: ['RdMain', 'W'],
total: 355,
self: 0,
isLowerBound: false,
children: [
[
'#8' // RdMain -> RTask, W.
],
[]
]
}
]
]
}
],
[
{ // *, T.
title: [undefined, 'T'],
total: 698,
self: 0,
isLowerBound: false,
children: [
[
'#4', // BrMain, T.
'#9' // RdMain, T.
],
[]
]
},
{ // *, V.
title: [undefined, 'V'],
total: 340,
self: 0,
isLowerBound: false,
children: [
[
'#5' // BrMain, V.
],
[]
]
},
{ // *, W.
title: [undefined, 'W'],
total: 461,
self: 0,
isLowerBound: false,
children: [
[
'#6', // BrMain, W.
'#10' // RdMain, W.
],
[]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined, undefined],
total: 1538,
self: 0,
isLowerBound: false,
children: [
[
{ // BrMain, *.
title: ['BrMain', undefined],
total: 876,
self: 0,
isLowerBound: true,
children: [
[
{ // BrMain -> Init, *.
title: ['Init', undefined],
total: 242,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // BrMain -> Init, T.
id: '#0',
title: ['Init', 'T'],
total: 151,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // BrMain -> Init, W.
id: '#1',
title: ['Init', 'W'],
total: 83,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // BrMain -> MsgLp, *.
title: ['MsgLp', undefined],
total: 601,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // BrMain -> MsgLp, T.
id: '#2',
title: ['MsgLp', 'T'],
total: 307,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // BrMain -> MsgLp, V.
id: '#3',
title: ['MsgLp', 'V'],
total: 281,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // BrMain, T.
id: '#4',
title: ['BrMain', 'T'],
total: 465,
self: 0,
isLowerBound: true,
children: [
[
'#0', // BrMain -> Init, T.
'#2' // BrMain -> MsgLp, T.
],
[]
]
},
{ // BrMain, V.
id: '#5',
title: ['BrMain', 'V'],
total: 297,
self: 0,
isLowerBound: true,
children: [
[
'#3' // BrMain -> MsgLp, V.
],
[]
]
},
{ // BrMain, W.
id: '#6',
title: ['BrMain', 'W'],
total: 96,
self: 0,
isLowerBound: true,
children: [
[
'#1' // BrMain -> Init, W.
],
[]
]
}
]
]
},
{ // Init, *.
title: ['Init', undefined],
total: 242,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Init, T.
id: '#7',
title: ['Init', 'T'],
total: 151,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // Init, W.
id: '#8',
title: ['Init', 'W'],
total: 83,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // MsgLp, *.
title: ['MsgLp', undefined],
total: 601,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // MsgLp, T.
id: '#9',
title: ['MsgLp', 'T'],
total: 307,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // MsgLp, V.
id: '#10',
title: ['MsgLp', 'V'],
total: 281,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // RdMain, *.
title: ['RdMain', undefined],
total: 628,
self: 0,
isLowerBound: true,
children: [
[
{ // RdMain -> RTask, *.
title: ['RTask', undefined],
total: 556,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // RdMain -> RTask, T.
id: '#11',
title: ['RTask', 'T'],
total: 211,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // RdMain -> RTask, W.
id: '#12',
title: ['RTask', 'W'],
total: 337,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // RdMain, T.
id: '#13',
title: ['RdMain', 'T'],
total: 229,
self: 0,
isLowerBound: true,
children: [
[
'#11' // RdMain -> RTask, T.
],
[]
]
},
{ // RdMain, W.
id: '#14',
title: ['RdMain', 'W'],
total: 355,
self: 0,
isLowerBound: true,
children: [
[
'#12' // RdMain -> RTask, W.
],
[]
]
}
]
]
},
{ // RTask, *.
title: ['RTask', undefined],
total: 556,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // RTask, T.
id: '#15',
title: ['RTask', 'T'],
total: 211,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // RTask, W.
id: '#16',
title: ['RTask', 'W'],
total: 337,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // *, T.
title: [undefined, 'T'],
total: 698,
self: 0,
isLowerBound: true,
children: [
[
'#4', // BrMain, T.
'#7', // Init, T.
'#9', // MsgLp, T.
'#13', // RdMain, T.
'#15' // RTask, T.
],
[]
]
},
{ // *, V.
title: [undefined, 'V'],
total: 340,
self: 0,
isLowerBound: true,
children: [
[
'#5', // BrMain, V.
'#10' // MsgLp, V.
],
[]
]
},
{ // *, W.
title: [undefined, 'W'],
total: 461,
self: 0,
isLowerBound: true,
children: [
[
'#6', // BrMain, W.
'#8', // Init, W.
'#14', // RdMain, W.
'#16' // RTask, W.
],
[]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined, undefined],
total: 1538,
self: 0,
isLowerBound: false,
children: [
[
{ // BrMain, *.
title: ['BrMain', undefined],
total: 876,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // BrMain, T.
id: '#0',
title: ['BrMain', 'T'],
total: 465,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // BrMain, V.
id: '#1',
title: ['BrMain', 'V'],
total: 297,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // BrMain, W.
id: '#2',
title: ['BrMain', 'W'],
total: 96,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // Init, *.
title: ['Init', undefined],
total: 242,
self: 0,
isLowerBound: true,
children: [
[
{ // Init -> BrMain, *.
title: ['BrMain', undefined],
total: 242,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // Init -> BrMain, T.
id: '#3',
title: ['BrMain', 'T'],
total: 151,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // Init -> BrMain, W.
id: '#4',
title: ['BrMain', 'W'],
total: 83,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // Init, T.
id: '#5',
title: ['Init', 'T'],
total: 151,
self: 0,
isLowerBound: true,
children: [
[
'#3' // Init -> BrMain, T.
],
[]
]
},
{ // Init, W.
id: '#6',
title: ['Init', 'W'],
total: 83,
self: 0,
isLowerBound: true,
children: [
[
'#4' // Init -> BrMain, W.
],
[]
]
}
]
]
},
{ // MsgLp, *.
title: ['MsgLp', undefined],
total: 601,
self: 0,
isLowerBound: true,
children: [
[
{ // MsgLp -> BrMain, *.
title: ['BrMain', undefined],
total: 601,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // MsgLp -> BrMain, T.
id: '#7',
title: ['BrMain', 'T'],
total: 307,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // MsgLp -> BrMain, V.
id: '#8',
title: ['BrMain', 'V'],
total: 281,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // MsgLp, T.
id: '#9',
title: ['MsgLp', 'T'],
total: 307,
self: 0,
isLowerBound: true,
children: [
[
'#7' // MsgLp -> BrMain, T.
],
[]
]
},
{ // MsgLp, V.
id: '#10',
title: ['MsgLp', 'V'],
total: 281,
self: 0,
isLowerBound: true,
children: [
[
'#8' // MsgLp -> BrMain, V.
],
[]
]
}
]
]
},
{ // RdMain, *.
title: ['RdMain', undefined],
total: 628,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // RdMain, T.
id: '#11',
title: ['RdMain', 'T'],
total: 229,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // RdMain, W.
id: '#12',
title: ['RdMain', 'W'],
total: 355,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // RTask, *.
title: ['RTask', undefined],
total: 556,
self: 0,
isLowerBound: true,
children: [
[
{ // RTask -> RdMain, *.
title: ['RdMain', undefined],
total: 556,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // RTask -> RdMain, T.
id: '#13',
title: ['RdMain', 'T'],
total: 211,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // RTask -> RdMain, W.
id: '#14',
title: ['RdMain', 'W'],
total: 337,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // RTask, T.
id: '#15',
title: ['RTask', 'T'],
total: 211,
self: 0,
isLowerBound: true,
children: [
[
'#13' // RTask -> RdMain, T.
],
[]
]
},
{ // RTask, W.
id: '#16',
title: ['RTask', 'W'],
total: 337,
self: 0,
isLowerBound: true,
children: [
[
'#14' // RTask -> RdMain, W.
],
[]
]
}
]
]
}
],
[
{ // *, T.
title: [undefined, 'T'],
total: 698,
self: 0,
isLowerBound: true,
children: [
[
'#0', // BrMain, T.
'#5', // Init, T.
'#9', // MsgLp, T.
'#11', // RdMain, T.
'#15' // RTask, T.
],
[]
]
},
{ // *, V.
title: [undefined, 'V'],
total: 340,
self: 0,
isLowerBound: true,
children: [
[
'#1', // BrMain, V.
'#10' // MsgLp, V.
],
[]
]
},
{ // *, W.
title: [undefined, 'W'],
total: 461,
self: 0,
isLowerBound: true,
children: [
[
'#2', // BrMain, W.
'#6', // Init, W.
'#12', // RdMain, W.
'#16' // RTask, W.
],
[]
]
}
]
]
});
builderTest('twoDimensions_oneRecursiveDimension', 2 /* dimensions */,
[
{ path: [['A', 'B'], []], value: 1500, kind: TOTAL },
{ path: [['A', 'B', 'A'], []], value: 200, kind: TOTAL },
{ path: [['A', 'B', 'B'], []], value: 300, kind: TOTAL },
{ path: [['A', 'B', 'C'], []], value: 700, kind: TOTAL },
{ path: [['A', 'B'], ['T1']], value: 15, kind: TOTAL },
{ path: [['A', 'B', 'A'], ['T1']], value: 2, kind: TOTAL },
{ path: [['A', 'B', 'B'], ['T1']], value: 3, kind: TOTAL },
{ path: [['A', 'B', 'C'], ['T1']], value: 7, kind: TOTAL },
{ path: [['B', 'A'], ['T1']], value: 30000, kind: TOTAL },
{ path: [['B', 'A'], []], value: 40000, kind: TOTAL }
],
{ // Top-down tree view.
title: [undefined, undefined],
total: 41500,
self: 0,
isLowerBound: true,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 1500,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B, *.
title: ['B', undefined],
total: 1500,
self: 0,
isLowerBound: false,
children: [
[
{ // A -> B -> A, *.
title: ['A', undefined],
total: 200,
self: 0,
isLowerBound: false,
children: [
[],
[
{ // A -> B -> A, T1.
id: '#0',
title: ['A', 'T1'],
total: 2,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
},
{ // A -> B -> B, *.
title: ['B', undefined],
total: 300,
self: 0,
isLowerBound: false,
children: [
[],
[
{ // A -> B -> B, T1.
id: '#1',
title: ['B', 'T1'],
total: 3,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
},
{ // A -> B -> C, *.
title: ['C', undefined],
total: 700,
self: 0,
isLowerBound: false,
children: [
[],
[
{ // A -> B -> C, T1.
id: '#2',
title: ['C', 'T1'],
total: 7,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
}
],
[
{ // A -> B, T1.
id: '#3',
title: ['B', 'T1'],
total: 15,
self: 0,
isLowerBound: false,
children: [
[
'#0', // A -> B -> A, T1.
'#1', // A -> B -> B, T1.
'#2' // A -> B -> C, T1.
],
[]
]
}
]
]
}
],
[
{ // A, T1.
id: '#4',
title: ['A', 'T1'],
total: 15,
self: 0,
isLowerBound: true,
children: [
[
'#3' // A -> B, T1.
],
[]
]
}
]
]
},
{ // B, *.
title: ['B', undefined],
total: 40000,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A, *.
title: ['A', undefined],
total: 40000,
self: 0,
isLowerBound: false,
children: [
[],
[
{ // B -> A, T1.
id: '#5',
title: ['A', 'T1'],
total: 30000,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
}
],
[
{ // B, T1.
id: '#6',
title: ['B', 'T1'],
total: 30000,
self: 0,
isLowerBound: true,
children: [
[
'#5' // B -> A, T1.
],
[]
]
}
]
]
}
],
[
{ // *, T1.
title: [undefined, 'T1'],
total: 30015,
self: 0,
isLowerBound: true,
children: [
[
'#4', // A, T1.
'#6' // B, T1.
],
[]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined, undefined],
total: 41500,
self: 0,
isLowerBound: true,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 41500,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B, *.
title: ['B', undefined],
total: 1500,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B -> A, *.
title: ['A', undefined],
total: 200,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B -> A, T1.
id: '#0',
title: ['A', 'T1'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // A -> B -> B, *.
title: ['B', undefined],
total: 300,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B -> B, T1.
id: '#1',
title: ['B', 'T1'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // A -> B -> C, *.
title: ['C', undefined],
total: 700,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B -> C, T1.
id: '#2',
title: ['C', 'T1'],
total: 7,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // A -> B, T1.
id: '#3',
title: ['B', 'T1'],
total: 15,
self: 0,
isLowerBound: true,
children: [
[
'#0', // A -> B -> A, T1.
'#1', // A -> B -> B, T1.
'#2' // A -> B -> C, T1.
],
[]
]
}
]
]
}
],
[
{ // A, T1.
id: '#4',
title: ['A', 'T1'],
total: 30015,
self: 0,
isLowerBound: true,
children: [
[
'#3' // A -> B, T1.
],
[]
]
}
]
]
},
{ // B, *.
title: ['B', undefined],
total: 41500,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A, *.
title: ['A', undefined],
total: 40200,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> A, T1.
id: '#5',
title: ['A', 'T1'],
total: 30002,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // B -> B, *.
title: ['B', undefined],
total: 300,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> B, T1.
id: '#6',
title: ['B', 'T1'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // B -> C, *.
title: ['C', undefined],
total: 700,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> C, T1.
id: '#7',
title: ['C', 'T1'],
total: 7,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // B, T1.
id: '#8',
title: ['B', 'T1'],
total: 30015,
self: 0,
isLowerBound: true,
children: [
[
'#5', // B -> A, T1.
'#6', // B -> B, T1.
'#7' // B -> C, T1.
],
[]
]
}
]
]
},
{ // C, *.
title: ['C', undefined],
total: 700,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // C, T1.
id: '#9',
title: ['C', 'T1'],
total: 7,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // *, T1.
title: [undefined, 'T1'],
total: 30015,
self: 0,
isLowerBound: true,
children: [
[
'#4', // A, T1.
'#8', // B, T1.
'#9' // C, T1.
],
[]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined, undefined],
total: 41500,
self: 0,
isLowerBound: true,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 41500,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B, *.
title: ['B', undefined],
total: 40200,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B -> A, *.
title: ['A', undefined],
total: 200,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B -> A, T1.
id: '#0',
title: ['A', 'T1'],
total: 2,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // A -> B, T1.
id: '#1',
title: ['B', 'T1'],
total: 30002,
self: 0,
isLowerBound: true,
children: [
[
'#0' // A -> B -> A, T1.
],
[]
]
}
]
]
}
],
[
{ // A, T1.
id: '#2',
title: ['A', 'T1'],
total: 30015,
self: 0,
isLowerBound: true,
children: [
[
'#1' // A -> B, T1.
],
[]
]
}
]
]
},
{ // B, *.
title: ['B', undefined],
total: 41500,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A, *.
title: ['A', undefined],
total: 1500,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> A, T1.
id: '#3',
title: ['A', 'T1'],
total: 15,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // B -> B, *.
title: ['B', undefined],
total: 300,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> B -> A, *.
title: ['A', undefined],
total: 300,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> B -> A, T1.
id: '#4',
title: ['A', 'T1'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // B -> B, T1.
id: '#5',
title: ['B', 'T1'],
total: 3,
self: 0,
isLowerBound: true,
children: [
[
'#4' // B -> B -> A, T1.
],
[]
]
}
]
]
}
],
[
{ // B, T1.
id: '#6',
title: ['B', 'T1'],
total: 30015,
self: 0,
isLowerBound: true,
children: [
[
'#3', // B -> A, T1.
'#5' // B -> B, T1.
],
[]
]
}
]
]
},
{ // C, *.
title: ['C', undefined],
total: 700,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> B, *.
title: ['B', undefined],
total: 700,
self: 0,
isLowerBound: true,
children: [
[
{ // C -> B -> A, *.
title: ['A', undefined],
total: 700,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // C -> B -> A, T1.
id: '#7',
title: ['A', 'T1'],
total: 7,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // C -> B, T1.
id: '#8',
title: ['B', 'T1'],
total: 7,
self: 0,
isLowerBound: true,
children: [
[
'#7' // C -> B -> A, T1.
],
[]
]
}
]
]
}
],
[
{ // C, T1.
id: '#9',
title: ['C', 'T1'],
total: 7,
self: 0,
isLowerBound: true,
children: [
[
'#8' // C -> B, T1.
],
[]
]
}
]
]
}
],
[
{ // *, T1.
title: [undefined, 'T1'],
total: 30015,
self: 0,
isLowerBound: true,
children: [
[
'#2', // A, T1.
'#6', // B, T1.
'#9' // C, T1.
],
[]
]
}
]
]
});
builderTest('twoDimensions_twoRecursiveDimensions', 2 /* dimensions */,
[
{ path: [['A', 'A', 'B'], ['1', '2', '2']], value: 10, kind: SELF },
{ path: [['A', 'A'], ['1', '2']], value: 40, kind: TOTAL },
{ path: [['A', 'B', 'B'], ['1', '1', '2']], value: 20, kind: TOTAL },
{ path: [['A', 'B'], ['1', '1']], value: 5, kind: SELF }
],
{ // Top-down tree view.
title: [undefined, undefined],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> A, *.
title: ['A', undefined],
total: 40,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> A -> B, *.
title: ['B', undefined],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> A -> B, 1.
id: '#0',
title: ['B', '1'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> A -> B, 1 -> 2.
id: '#1',
title: ['B', '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> A -> B, 1 -> 2 -> 2.
id: '#2',
title: ['B', '2'],
total: 10,
self: 10,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
}
]
]
}
]
]
}
],
[
{ // A -> A, 1.
id: '#3',
title: ['A', '1'],
total: 40,
self: 0,
isLowerBound: true,
children: [
[
'#0' // A -> A -> B, 1.
],
[
{ // A -> A, 1 -> 2.
id: '#4',
title: ['A', '2'],
total: 40,
self: 0,
isLowerBound: false,
children: [
[
'#1' // A -> A -> B, 1 -> 2.
],
[
{ // A -> A, 1 -> 2 -> 2.
id: '#5',
title: ['A', '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#2' // A -> A -> B, 1 -> 2 -> 2.
],
[]
]
}
]
]
}
]
]
}
]
]
},
{ // A -> B, *.
title: ['B', undefined],
total: 25,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B -> B, *.
title: ['B', undefined],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B -> B, 1.
id: '#6',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B -> B, 1 -> 1.
id: '#7',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B -> B, 1 -> 1 -> 2.
id: '#8',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: false,
children: [
[],
[]
]
}
]
]
}
]
]
}
]
]
}
],
[
{ // A -> B, 1.
id: '#9',
title: ['B', '1'],
total: 25,
self: 0,
isLowerBound: true,
children: [
[
'#6' // A -> B -> B, 1.
],
[
{ // A -> B, 1 -> 1.
id: '#10',
title: ['B', '1'],
total: 25,
self: 5,
isLowerBound: false,
children: [
[
'#7' // A -> B -> B, 1 -> 1.
],
[
{ // A -> B, 1 -> 1 -> 2.
id: '#11',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#8' // A -> B -> B, 1 -> 1 -> 2.
],
[]
]
}
]
]
}
]
]
}
]
]
}
],
[
{ // A, 1.
id: '#12',
title: ['A', '1'],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
'#3', // A -> A, 1.
'#9' // A -> B, 1.
],
[
{ // A, 1 -> 2.
id: '#13',
title: ['A', '2'],
total: 40,
self: 0,
isLowerBound: true,
children: [
[
'#4' // A -> A, 1 -> 2.
],
[
{ // A, 1 -> 2 -> 2.
id: '#14',
title: ['A', '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#5' // A -> A, 1 -> 2 -> 2.
],
[]
]
}
]
]
},
{ // A, 1 -> 1.
id: '#15',
title: ['A', '1'],
total: 25,
self: 0,
isLowerBound: true,
children: [
[
'#10' // A -> B, 1 -> 1.
],
[
{ // A, 1 -> 1 -> 2.
id: '#16',
title: ['A', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#11' // A -> B, 1 -> 1 -> 2.
],
[]
]
}
]
]
}
]
]
}
]
]
}
],
[
{ // *, 1.
title: [undefined, '1'],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
'#12' // A, 1.
],
[
{ // *, 1 -> 2.
title: [undefined, '2'],
total: 40,
self: 0,
isLowerBound: true,
children: [
[
'#13' // A, 1 -> 2.
],
[
{ // *, 1 -> 2 -> 2.
title: [undefined, '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#14' // A, 1 -> 2 -> 2.
],
[]
]
}
]
]
},
{ // *, 1 -> 1.
title: [undefined, '1'],
total: 25,
self: 0,
isLowerBound: true,
children: [
[
'#15' // A, 1 -> 1.
],
[
{ // *, 1 -> 1 -> 2.
title: [undefined, '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#16' // A, 1 -> 1 -> 2.
],
[]
]
}
]
]
}
]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined, undefined],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> A, *.
title: ['A', undefined],
total: 40,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> A -> B, *.
title: ['B', undefined],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> A -> B, 1.
id: '#0',
title: ['B', '1'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> A -> B, 1 -> 2.
id: '#1',
title: ['B', '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> A -> B, 1 -> 2 -> 2.
id: '#2',
title: ['B', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
},
{ // A -> A -> B, 2.
id: '#3',
title: ['B', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[],
[
{ // A -> A -> B, 2 -> 2.
id: '#4',
title: ['B', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // A -> A, 1.
id: '#5',
title: ['A', '1'],
total: 40,
self: 0,
isLowerBound: true,
children: [
[
'#0' // A -> A -> B, 1.
],
[
{ // A -> A, 1 -> 2.
id: '#6',
title: ['A', '2'],
total: 40,
self: 0,
isLowerBound: true,
children: [
[
'#1' // A -> A -> B, 1 -> 2.
],
[
{ // A -> A, 1 -> 2 -> 2.
id: '#7',
title: ['A', '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#2' // A -> A -> B, 1 -> 2 -> 2.
],
[]
]
}
]
]
}
]
]
},
{ // A -> A, 2.
id: '#8',
title: ['A', '2'],
total: 40,
self: 0,
isLowerBound: true,
children: [
[
'#3' // A -> A -> B, 2.
],
[
{ // A -> A, 2 -> 2.
id: '#9',
title: ['A', '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#4' // A -> A -> B, 2 -> 2.
],
[]
]
}
]
]
}
]
]
},
{ // A -> B, *.
title: ['B', undefined],
total: 35,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> B -> B, *.
title: ['B', undefined],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B -> B, 1.
id: '#10',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B -> B, 1 -> 1.
id: '#11',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> B -> B, 1 -> 1 -> 2.
id: '#12',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // A -> B -> B, 1 -> 2.
id: '#13',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // A -> B -> B, 2.
id: '#14',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // A -> B, 1.
id: '#15',
title: ['B', '1'],
total: 35,
self: 5,
isLowerBound: true,
children: [
[
'#10' // A -> B -> B, 1.
],
[
{ // A -> B, 1 -> 1.
id: '#16',
title: ['B', '1'],
total: 25,
self: 5,
isLowerBound: true,
children: [
[
'#11' // A -> B -> B, 1 -> 1.
],
[
{ // A -> B, 1 -> 1 -> 2.
id: '#17',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#12' // A -> B -> B, 1 -> 1 -> 2.
],
[]
]
}
]
]
},
{ // A -> B, 1 -> 2.
id: '#18',
title: ['B', '2'],
total: 30,
self: 0,
isLowerBound: true,
children: [
[
'#13' // A -> B -> B, 1 -> 2.
],
[
{ // A -> B, 1 -> 2 -> 2.
id: '#19',
title: ['B', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
},
{ // A -> B, 2.
id: '#20',
title: ['B', '2'],
total: 30,
self: 10,
isLowerBound: true,
children: [
[
'#14' // A -> B -> B, 2.
],
[
{ // A -> B, 2 -> 2.
id: '#21',
title: ['B', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // A, 1.
id: '#22',
title: ['A', '1'],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
'#5', // A -> A, 1.
'#15' // A -> B, 1.
],
[
{ // A, 1 -> 2.
id: '#23',
title: ['A', '2'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
'#6', // A -> A, 1 -> 2.
'#18' // A -> B, 1 -> 2.
],
[
{ // A, 1 -> 2 -> 2.
id: '#24',
title: ['A', '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#7', // A -> A, 1 -> 2 -> 2.
'#19' // A -> B, 1 -> 2 -> 2.
],
[]
]
}
]
]
},
{ // A, 1 -> 1.
id: '#25',
title: ['A', '1'],
total: 25,
self: 0,
isLowerBound: true,
children: [
[
'#16' // A -> B, 1 -> 1.
],
[
{ // A, 1 -> 1 -> 2.
id: '#26',
title: ['A', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#17' // A -> B, 1 -> 1 -> 2.
],
[]
]
}
]
]
}
]
]
},
{ // A, 2.
id: '#27',
title: ['A', '2'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
'#8', // A -> A, 2.
'#20' // A -> B, 2.
],
[
{ // A, 2 -> 2.
id: '#28',
title: ['A', '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#9', // A -> A, 2 -> 2.
'#21' // A -> B, 2 -> 2.
],
[]
]
}
]
]
}
]
]
},
{ // B, *.
title: ['B', undefined],
total: 35,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> B, *.
title: ['B', undefined],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> B, 1.
id: '#29',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> B, 1 -> 1.
id: '#30',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> B, 1 -> 1 -> 2.
id: '#31',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // B -> B, 1 -> 2.
id: '#32',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // B -> B, 2.
id: '#33',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
],
[
{ // B, 1.
id: '#34',
title: ['B', '1'],
total: 35,
self: 5,
isLowerBound: true,
children: [
[
'#29' // B -> B, 1.
],
[
{ // B, 1 -> 2.
id: '#35',
title: ['B', '2'],
total: 30,
self: 0,
isLowerBound: true,
children: [
[
'#32' // B -> B, 1 -> 2.
],
[
{ // B, 1 -> 2 -> 2.
id: '#36',
title: ['B', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // B, 1 -> 1.
id: '#37',
title: ['B', '1'],
total: 25,
self: 5,
isLowerBound: true,
children: [
[
'#30' // B -> B, 1 -> 1.
],
[
{ // B, 1 -> 1 -> 2.
id: '#38',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#31' // B -> B, 1 -> 1 -> 2.
],
[]
]
}
]
]
}
]
]
},
{ // B, 2.
id: '#39',
title: ['B', '2'],
total: 30,
self: 10,
isLowerBound: true,
children: [
[
'#33' // B -> B, 2.
],
[
{ // B, 2 -> 2.
id: '#40',
title: ['B', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, 1.
title: [undefined, '1'],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
'#22', // A, 1.
'#34' // B, 1.
],
[
{ // *, 1 -> 2.
title: [undefined, '2'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
'#23', // A, 1 -> 2.
'#35' // B, 1 -> 2.
],
[
{ // *, 1 -> 2 -> 2.
title: [undefined, '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#24', // A, 1 -> 2 -> 2.
'#36' // B, 1 -> 2 -> 2.
],
[]
]
}
]
]
},
{ // *, 1 -> 1.
title: [undefined, '1'],
total: 25,
self: 0,
isLowerBound: true,
children: [
[
'#25', // A, 1 -> 1.
'#37' // B, 1 -> 1.
],
[
{ // *, 1 -> 1 -> 2.
title: [undefined, '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#26', // A, 1 -> 1 -> 2.
'#38' // B, 1 -> 1 -> 2.
],
[]
]
}
]
]
}
]
]
},
{ // *, 2.
title: [undefined, '2'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
'#27', // A, 2.
'#39' // B, 2.
],
[
{ // *, 2 -> 2.
title: [undefined, '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#28', // A, 2 -> 2.
'#40' // B, 2 -> 2.
],
[]
]
}
]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined, undefined],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
{ // A, *.
title: ['A', undefined],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
{ // A -> A, *.
title: ['A', undefined],
total: 40,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> A, 1.
id: '#0',
title: ['A', '1'],
total: 40,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // A -> A, 2.
id: '#1',
title: ['A', '2'],
total: 40,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> A, 2 -> 1.
id: '#2',
title: ['A', '1'],
total: 40,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // A -> A, 2 -> 2.
id: '#3',
title: ['A', '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // A -> A, 2 -> 2 -> 1.
id: '#4',
title: ['A', '1'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
}
]
]
}
],
[
{ // A, 1.
id: '#5',
title: ['A', '1'],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
'#0' // A -> A, 1.
],
[
{ // A, 1 -> 1.
id: '#6',
title: ['A', '1'],
total: 25,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // A, 2.
id: '#7',
title: ['A', '2'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
'#1' // A -> A, 2.
],
[
{ // A, 2 -> 1.
id: '#8',
title: ['A', '1'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
'#2' // A -> A, 2 -> 1.
],
[
{ // A, 2 -> 1 -> 1.
id: '#9',
title: ['A', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // A, 2 -> 2.
id: '#10',
title: ['A', '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#3' // A -> A, 2 -> 2.
],
[
{ // A, 2 -> 2 -> 1.
id: '#11',
title: ['A', '1'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#4' // A -> A, 2 -> 2 -> 1.
],
[]
]
}
]
]
}
]
]
}
]
]
},
{ // B, *.
title: ['B', undefined],
total: 35,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A, *.
title: ['A', undefined],
total: 35,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> A -> A, *.
title: ['A', undefined],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> A -> A, 1.
id: '#12',
title: ['A', '1'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // B -> A -> A, 2.
id: '#13',
title: ['A', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[],
[
{ // B -> A -> A, 2 -> 1.
id: '#14',
title: ['A', '1'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
},
{ // B -> A -> A, 2 -> 2.
id: '#15',
title: ['A', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[],
[
{ // B -> A -> A, 2 -> 2 -> 1.
id: '#16',
title: ['A', '1'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
}
]
]
}
],
[
{ // B -> A, 1.
id: '#17',
title: ['A', '1'],
total: 35,
self: 5,
isLowerBound: true,
children: [
[
'#12' // B -> A -> A, 1.
],
[
{ // B -> A, 1 -> 1.
id: '#18',
title: ['A', '1'],
total: 25,
self: 5,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // B -> A, 2.
id: '#19',
title: ['A', '2'],
total: 30,
self: 10,
isLowerBound: true,
children: [
[
'#13' // B -> A -> A, 2.
],
[
{ // B -> A, 2 -> 1.
id: '#20',
title: ['A', '1'],
total: 30,
self: 0,
isLowerBound: true,
children: [
[
'#14' // B -> A -> A, 2 -> 1.
],
[
{ // B -> A, 2 -> 1 -> 1.
id: '#21',
title: ['A', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // B -> A, 2 -> 2.
id: '#22',
title: ['A', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[
'#15' // B -> A -> A, 2 -> 2.
],
[
{ // B -> A, 2 -> 2 -> 1.
id: '#23',
title: ['A', '1'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[
'#16' // B -> A -> A, 2 -> 2 -> 1.
],
[]
]
}
]
]
}
]
]
}
]
]
},
{ // B -> B, *.
title: ['B', undefined],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
{ // B -> B -> A, *.
title: ['A', undefined],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> B -> A, 1.
id: '#24',
title: ['A', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> B -> A, 1 -> 1.
id: '#25',
title: ['A', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
},
{ // B -> B -> A, 2.
id: '#26',
title: ['A', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> B -> A, 2 -> 1.
id: '#27',
title: ['A', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[
{ // B -> B -> A, 2 -> 1 -> 1.
id: '#28',
title: ['A', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[],
[]
]
}
]
]
}
]
]
}
]
]
}
],
[
{ // B -> B, 1.
id: '#29',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#24' // B -> B -> A, 1.
],
[
{ // B -> B, 1 -> 1.
id: '#30',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#25' // B -> B -> A, 1 -> 1.
],
[]
]
}
]
]
},
{ // B -> B, 2.
id: '#31',
title: ['B', '2'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#26' // B -> B -> A, 2.
],
[
{ // B -> B, 2 -> 1.
id: '#32',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#27' // B -> B -> A, 2 -> 1.
],
[
{ // B -> B, 2 -> 1 -> 1.
id: '#33',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#28' // B -> B -> A, 2 -> 1 -> 1.
],
[]
]
}
]
]
}
]
]
}
]
]
}
],
[
{ // B, 1.
id: '#34',
title: ['B', '1'],
total: 35,
self: 5,
isLowerBound: true,
children: [
[
'#17', // B -> A, 1.
'#29' // B -> B, 1.
],
[
{ // B, 1 -> 1.
id: '#35',
title: ['B', '1'],
total: 25,
self: 5,
isLowerBound: true,
children: [
[
'#18', // B -> A, 1 -> 1.
'#30' // B -> B, 1 -> 1.
],
[]
]
}
]
]
},
{ // B, 2.
id: '#36',
title: ['B', '2'],
total: 30,
self: 10,
isLowerBound: true,
children: [
[
'#19', // B -> A, 2.
'#31' // B -> B, 2.
],
[
{ // B, 2 -> 1.
id: '#37',
title: ['B', '1'],
total: 30,
self: 0,
isLowerBound: true,
children: [
[
'#20', // B -> A, 2 -> 1.
'#32' // B -> B, 2 -> 1.
],
[
{ // B, 2 -> 1 -> 1.
id: '#38',
title: ['B', '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#21', // B -> A, 2 -> 1 -> 1.
'#33' // B -> B, 2 -> 1 -> 1.
],
[]
]
}
]
]
},
{ // B, 2 -> 2.
id: '#39',
title: ['B', '2'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[
'#22' // B -> A, 2 -> 2.
],
[
{ // B, 2 -> 2 -> 1.
id: '#40',
title: ['B', '1'],
total: 10,
self: 10,
isLowerBound: true,
children: [
[
'#23' // B -> A, 2 -> 2 -> 1.
],
[]
]
}
]
]
}
]
]
}
]
]
}
],
[
{ // *, 1.
title: [undefined, '1'],
total: 65,
self: 0,
isLowerBound: true,
children: [
[
'#5', // A, 1.
'#34' // B, 1.
],
[
{ // *, 1 -> 1.
title: [undefined, '1'],
total: 25,
self: 0,
isLowerBound: true,
children: [
[
'#6', // A, 1 -> 1.
'#35' // B, 1 -> 1.
],
[]
]
}
]
]
},
{ // *, 2.
title: [undefined, '2'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
'#7', // A, 2.
'#36' // B, 2.
],
[
{ // *, 2 -> 1.
title: [undefined, '1'],
total: 60,
self: 0,
isLowerBound: true,
children: [
[
'#8', // A, 2 -> 1.
'#37' // B, 2 -> 1.
],
[
{ // *, 2 -> 1 -> 1.
title: [undefined, '1'],
total: 20,
self: 0,
isLowerBound: true,
children: [
[
'#9', // A, 2 -> 1 -> 1.
'#38' // B, 2 -> 1 -> 1.
],
[]
]
}
]
]
},
{ // *, 2 -> 2.
title: [undefined, '2'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#10', // A, 2 -> 2.
'#39' // B, 2 -> 2.
],
[
{ // *, 2 -> 2 -> 1.
title: [undefined, '1'],
total: 10,
self: 0,
isLowerBound: true,
children: [
[
'#11', // A, 2 -> 2 -> 1.
'#40' // B, 2 -> 2 -> 1.
],
[]
]
}
]
]
}
]
]
}
]
]
});
builderTest('threeDimensions', 3 /* dimensions */,
[
{ path: [['A', 'B'], ['C', 'D'], ['E', 'F']], value: b(0), kind: SELF },
{ path: [['A', 'B'], ['C', 'D'], ['E']], value: b(1), kind: SELF },
{ path: [['A', 'B'], ['C', 'D'], []], value: b(2), kind: SELF },
{ path: [['A', 'B'], ['C'], ['E', 'F']], value: b(3), kind: SELF },
{ path: [['A', 'B'], ['C'], ['E']], value: b(4), kind: SELF },
{ path: [['A', 'B'], ['C'], []], value: b(5), kind: SELF },
{ path: [['A', 'B'], [], ['E', 'F']], value: b(6), kind: SELF },
{ path: [['A', 'B'], [], ['E']], value: b(7), kind: SELF },
{ path: [['A', 'B'], [], []], value: b(8), kind: SELF },
{ path: [['A'], ['C', 'D'], ['E', 'F']], value: b(9), kind: SELF },
{ path: [['A'], ['C', 'D'], ['E']], value: b(10), kind: SELF },
{ path: [['A'], ['C', 'D'], []], value: b(11), kind: SELF },
{ path: [['A'], ['C'], ['E', 'F']], value: b(12), kind: SELF },
{ path: [['A'], ['C'], ['E']], value: b(13), kind: SELF },
{ path: [['A'], ['C'], []], value: b(14), kind: SELF },
{ path: [['A'], [], ['E', 'F']], value: b(15), kind: SELF },
{ path: [['A'], [], ['E']], value: b(16), kind: SELF },
{ path: [['A'], [], []], value: b(17), kind: SELF },
{ path: [[], ['C', 'D'], ['E', 'F']], value: b(18), kind: SELF },
{ path: [[], ['C', 'D'], ['E']], value: b(19), kind: SELF },
{ path: [[], ['C', 'D'], []], value: b(20), kind: SELF },
{ path: [[], ['C'], ['E', 'F']], value: b(21), kind: SELF },
{ path: [[], ['C'], ['E']], value: b(22), kind: SELF },
{ path: [[], ['C'], []], value: b(23), kind: SELF },
{ path: [[], [], ['E', 'F']], value: b(24), kind: SELF },
{ path: [[], [], ['E']], value: b(25), kind: SELF },
{ path: [[], [], []], value: b(26), kind: SELF }
],
{ // Top-down tree view.
title: [undefined, undefined, undefined],
total: b([0, 26]),
self: b(26),
isLowerBound: false,
children: [
[
{ // A, *, *.
title: ['A', undefined, undefined],
total: b([0, 17]),
self: b(17),
isLowerBound: false,
children: [
[
{ // A -> B, *, *.
title: ['B', undefined, undefined],
total: b([0, 8]),
self: b(8),
isLowerBound: false,
children: [
[],
[
{ // A -> B, C, *.
id: '#0',
title: ['B', 'C', undefined],
total: b([0, 5]),
self: b(5),
isLowerBound: false,
children: [
[],
[
{ // A -> B, C -> D, *.
id: '#1',
title: ['B', 'D', undefined],
total: b([0, 2]),
self: b(2),
isLowerBound: false,
children: [
[],
[],
[
{ // A -> B, C -> D, E.
id: '#2',
title: ['B', 'D', 'E'],
total: b(0, 1),
self: b(1),
isLowerBound: false,
children: [
[],
[],
[
{ // A -> B, C -> D, E -> F.
id: '#3',
title: ['B', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: false,
children: [
[],
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // A -> B, C, E.
id: '#4',
title: ['B', 'C', 'E'],
total: b(0, 1, 3, 4),
self: b(4),
isLowerBound: false,
children: [
[],
[
'#2' // A -> B, C -> D, E.
],
[
{ // A -> B, C, E -> F.
id: '#5',
title: ['B', 'C', 'F'],
total: b(0, 3),
self: b(3),
isLowerBound: false,
children: [
[],
[
'#3' // A -> B, C -> D, E -> F.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // A -> B, *, E.
id: '#6',
title: ['B', undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7),
self: b(7),
isLowerBound: false,
children: [
[],
[
'#4' // A -> B, C, E.
],
[
{ // A -> B, *, E -> F.
id: '#7',
title: ['B', undefined, 'F'],
total: b(0, 3, 6),
self: b(6),
isLowerBound: false,
children: [
[],
[
'#5' // A -> B, C, E -> F.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // A, C, *.
id: '#8',
title: ['A', 'C', undefined],
total: b([0, 5], [9, 14]),
self: b(14),
isLowerBound: false,
children: [
[
'#0' // A -> B, C, *.
],
[
{ // A, C -> D, *.
id: '#9',
title: ['A', 'D', undefined],
total: b([0, 2], [9, 11]),
self: b(11),
isLowerBound: false,
children: [
[
'#1' // A -> B, C -> D, *.
],
[],
[
{ // A, C -> D, E.
id: '#10',
title: ['A', 'D', 'E'],
total: b(0, 1, 9, 10),
self: b(10),
isLowerBound: false,
children: [
[
'#2' // A -> B, C -> D, E.
],
[],
[
{ // A, C -> D, E -> F.
id: '#11',
title: ['A', 'D', 'F'],
total: b(0, 9),
self: b(9),
isLowerBound: false,
children: [
[
'#3' // A -> B, C -> D, E -> F.
],
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // A, C, E.
id: '#12',
title: ['A', 'C', 'E'],
total: b(0, 1, 3, 4, 9, 10, 12, 13),
self: b(13),
isLowerBound: false,
children: [
[
'#4' // A -> B, C, E.
],
[
'#10' // A, C -> D, E.
],
[
{ // A, C, E -> F.
id: '#13',
title: ['A', 'C', 'F'],
total: b(0, 3, 9, 12),
self: b(12),
isLowerBound: false,
children: [
[
'#5' // A -> B, C, E -> F.
],
[
'#11' // A, C -> D, E -> F.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // A, *, E.
id: '#14',
title: ['A', undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16),
self: b(16),
isLowerBound: false,
children: [
[
'#6' // A -> B, *, E.
],
[
'#12' // A, C, E.
],
[
{ // A, *, E -> F.
id: '#15',
title: ['A', undefined, 'F'],
total: b(0, 3, 6, 9, 12, 15),
self: b(15),
isLowerBound: false,
children: [
[
'#7' // A -> B, *, E -> F.
],
[
'#13' // A, C, E -> F.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, C, *.
title: [undefined, 'C', undefined],
total: b([0, 5], [9, 14], [18, 23]),
self: b(23),
isLowerBound: false,
children: [
[
'#8' // A, C, *.
],
[
{ // *, C -> D, *.
title: [undefined, 'D', undefined],
total: b([0, 2], [9, 11], [18, 20]),
self: b(20),
isLowerBound: false,
children: [
[
'#9' // A, C -> D, *.
],
[],
[
{ // *, C -> D, E.
id: '#16',
title: [undefined, 'D', 'E'],
total: b(0, 1, 9, 10, 18, 19),
self: b(19),
isLowerBound: false,
children: [
[
'#10' // A, C -> D, E.
],
[],
[
{ // *, C -> D, E -> F.
id: '#17',
title: [undefined, 'D', 'F'],
total: b(0, 9, 18),
self: b(18),
isLowerBound: false,
children: [
[
'#11' // A, C -> D, E -> F.
],
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, C, E.
id: '#18',
title: [undefined, 'C', 'E'],
total: b(0, 1, 3, 4, 9, 10, 12, 13, 18, 19, 21, 22),
self: b(22),
isLowerBound: false,
children: [
[
'#12' // A, C, E.
],
[
'#16' // *, C -> D, E.
],
[
{ // *, C, E -> F.
id: '#19',
title: [undefined, 'C', 'F'],
total: b(0, 3, 9, 12, 18, 21),
self: b(21),
isLowerBound: false,
children: [
[
'#13' // A, C, E -> F.
],
[
'#17' // *, C -> D, E -> F.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, *, E.
title: [undefined, undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22,
24, 25),
self: b(25),
isLowerBound: false,
children: [
[
'#14' // A, *, E.
],
[
'#18' // *, C, E.
],
[
{ // *, *, E -> F.
title: [undefined, undefined, 'F'],
total: b(0, 3, 6, 9, 12, 15, 18, 21, 24),
self: b(24),
isLowerBound: false,
children: [
[
'#15' // A, *, E -> F.
],
[
'#19' // *, C, E -> F.
],
[]
]
}
]
]
}
]
]
},
{ // Top-down heavy view.
title: [undefined, undefined, undefined],
total: b([0, 26]),
self: b(26),
isLowerBound: false,
children: [
[
{ // A, *, *.
title: ['A', undefined, undefined],
total: b([0, 17]),
self: b(17),
isLowerBound: true,
children: [
[
{ // A -> B, *, *.
title: ['B', undefined, undefined],
total: b([0, 8]),
self: b(8),
isLowerBound: true,
children: [
[],
[
{ // A -> B, C, *.
id: '#0',
title: ['B', 'C', undefined],
total: b([0, 5]),
self: b(5),
isLowerBound: true,
children: [
[],
[
{ // A -> B, C -> D, *.
id: '#1',
title: ['B', 'D', undefined],
total: b([0, 2]),
self: b(2),
isLowerBound: true,
children: [
[],
[],
[
{ // A -> B, C -> D, E.
id: '#2',
title: ['B', 'D', 'E'],
total: b(0, 1),
self: b(1),
isLowerBound: true,
children: [
[],
[],
[
{ // A -> B, C -> D, E -> F.
id: '#3',
title: ['B', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
},
{ // A -> B, C -> D, F.
id: '#4',
title: ['B', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
}
],
[
{ // A -> B, C, E.
id: '#5',
title: ['B', 'C', 'E'],
total: b(0, 1, 3, 4),
self: b(4),
isLowerBound: true,
children: [
[],
[
'#2' // A -> B, C -> D, E.
],
[
{ // A -> B, C, E -> F.
id: '#6',
title: ['B', 'C', 'F'],
total: b(0, 3),
self: b(3),
isLowerBound: true,
children: [
[],
[
'#3' // A -> B, C -> D, E -> F.
],
[]
]
}
]
]
},
{ // A -> B, C, F.
id: '#7',
title: ['B', 'C', 'F'],
total: b(0, 3),
self: b(3),
isLowerBound: true,
children: [
[],
[
'#4' // A -> B, C -> D, F.
],
[]
]
}
]
]
},
{ // A -> B, D, *.
id: '#8',
title: ['B', 'D', undefined],
total: b([0, 2]),
self: b(2),
isLowerBound: true,
children: [
[],
[],
[
{ // A -> B, D, E.
id: '#9',
title: ['B', 'D', 'E'],
total: b(0, 1),
self: b(1),
isLowerBound: true,
children: [
[],
[],
[
{ // A -> B, D, E -> F.
id: '#10',
title: ['B', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
},
{ // A -> B, D, F.
id: '#11',
title: ['B', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
}
],
[
{ // A -> B, *, E.
id: '#12',
title: ['B', undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7),
self: b(7),
isLowerBound: true,
children: [
[],
[
'#5', // A -> B, C, E.
'#9' // A -> B, D, E.
],
[
{ // A -> B, *, E -> F.
id: '#13',
title: ['B', undefined, 'F'],
total: b(0, 3, 6),
self: b(6),
isLowerBound: true,
children: [
[],
[
'#6', // A -> B, C, E -> F.
'#10' // A -> B, D, E -> F.
],
[]
]
}
]
]
},
{ // A -> B, *, F.
id: '#14',
title: ['B', undefined, 'F'],
total: b(0, 3, 6),
self: b(6),
isLowerBound: true,
children: [
[],
[
'#7', // A -> B, C, F.
'#11' // A -> B, D, F.
],
[]
]
}
]
]
}
],
[
{ // A, C, *.
id: '#15',
title: ['A', 'C', undefined],
total: b([0, 5], [9, 14]),
self: b(14),
isLowerBound: true,
children: [
[
'#0' // A -> B, C, *.
],
[
{ // A, C -> D, *.
id: '#16',
title: ['A', 'D', undefined],
total: b([0, 2], [9, 11]),
self: b(11),
isLowerBound: true,
children: [
[
'#1' // A -> B, C -> D, *.
],
[],
[
{ // A, C -> D, E.
id: '#17',
title: ['A', 'D', 'E'],
total: b(0, 1, 9, 10),
self: b(10),
isLowerBound: true,
children: [
[
'#2' // A -> B, C -> D, E.
],
[],
[
{ // A, C -> D, E -> F.
id: '#18',
title: ['A', 'D', 'F'],
total: b(0, 9),
self: b(9),
isLowerBound: true,
children: [
[
'#3' // A -> B, C -> D, E -> F.
],
[],
[]
]
}
]
]
},
{ // A, C -> D, F.
id: '#19',
title: ['A', 'D', 'F'],
total: b(0, 9),
self: b(9),
isLowerBound: true,
children: [
[
'#4' // A -> B, C -> D, F.
],
[],
[]
]
}
]
]
}
],
[
{ // A, C, E.
id: '#20',
title: ['A', 'C', 'E'],
total: b(0, 1, 3, 4, 9, 10, 12, 13),
self: b(13),
isLowerBound: true,
children: [
[
'#5' // A -> B, C, E.
],
[
'#17' // A, C -> D, E.
],
[
{ // A, C, E -> F.
id: '#21',
title: ['A', 'C', 'F'],
total: b(0, 3, 9, 12),
self: b(12),
isLowerBound: true,
children: [
[
'#6' // A -> B, C, E -> F.
],
[
'#18' // A, C -> D, E -> F.
],
[]
]
}
]
]
},
{ // A, C, F.
id: '#22',
title: ['A', 'C', 'F'],
total: b(0, 3, 9, 12),
self: b(12),
isLowerBound: true,
children: [
[
'#7' // A -> B, C, F.
],
[
'#19' // A, C -> D, F.
],
[]
]
}
]
]
},
{ // A, D, *.
id: '#23',
title: ['A', 'D', undefined],
total: b([0, 2], [9, 11]),
self: b(11),
isLowerBound: true,
children: [
[
'#8' // A -> B, D, *.
],
[],
[
{ // A, D, E.
id: '#24',
title: ['A', 'D', 'E'],
total: b(0, 1, 9, 10),
self: b(10),
isLowerBound: true,
children: [
[
'#9' // A -> B, D, E.
],
[],
[
{ // A, D, E -> F.
id: '#25',
title: ['A', 'D', 'F'],
total: b(0, 9),
self: b(9),
isLowerBound: true,
children: [
[
'#10' // A -> B, D, E -> F.
],
[],
[]
]
}
]
]
},
{ // A, D, F.
id: '#26',
title: ['A', 'D', 'F'],
total: b(0, 9),
self: b(9),
isLowerBound: true,
children: [
[
'#11' // A -> B, D, F.
],
[],
[]
]
}
]
]
}
],
[
{ // A, *, E.
id: '#27',
title: ['A', undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16),
self: b(16),
isLowerBound: true,
children: [
[
'#12' // A -> B, *, E.
],
[
'#20', // A, C, E.
'#24' // A, D, E.
],
[
{ // A, *, E -> F.
id: '#28',
title: ['A', undefined, 'F'],
total: b(0, 3, 6, 9, 12, 15),
self: b(15),
isLowerBound: true,
children: [
[
'#13' // A -> B, *, E -> F.
],
[
'#21', // A, C, E -> F.
'#25' // A, D, E -> F.
],
[]
]
}
]
]
},
{ // A, *, F.
id: '#29',
title: ['A', undefined, 'F'],
total: b(0, 3, 6, 9, 12, 15),
self: b(15),
isLowerBound: true,
children: [
[
'#14' // A -> B, *, F.
],
[
'#22', // A, C, F.
'#26' // A, D, F.
],
[]
]
}
]
]
},
{ // B, *, *.
title: ['B', undefined, undefined],
total: b([0, 8]),
self: b(8),
isLowerBound: true,
children: [
[],
[
{ // B, C, *.
id: '#30',
title: ['B', 'C', undefined],
total: b([0, 5]),
self: b(5),
isLowerBound: true,
children: [
[],
[
{ // B, C -> D, *.
id: '#31',
title: ['B', 'D', undefined],
total: b([0, 2]),
self: b(2),
isLowerBound: true,
children: [
[],
[],
[
{ // B, C -> D, E.
id: '#32',
title: ['B', 'D', 'E'],
total: b(0, 1),
self: b(1),
isLowerBound: true,
children: [
[],
[],
[
{ // B, C -> D, E -> F.
id: '#33',
title: ['B', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
},
{ // B, C -> D, F.
id: '#34',
title: ['B', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
}
],
[
{ // B, C, E.
id: '#35',
title: ['B', 'C', 'E'],
total: b(0, 1, 3, 4),
self: b(4),
isLowerBound: true,
children: [
[],
[
'#32' // B, C -> D, E.
],
[
{ // B, C, E -> F.
id: '#36',
title: ['B', 'C', 'F'],
total: b(0, 3),
self: b(3),
isLowerBound: true,
children: [
[],
[
'#33' // B, C -> D, E -> F.
],
[]
]
}
]
]
},
{ // B, C, F.
id: '#37',
title: ['B', 'C', 'F'],
total: b(0, 3),
self: b(3),
isLowerBound: true,
children: [
[],
[
'#34' // B, C -> D, F.
],
[]
]
}
]
]
},
{ // B, D, *.
id: '#38',
title: ['B', 'D', undefined],
total: b([0, 2]),
self: b(2),
isLowerBound: true,
children: [
[],
[],
[
{ // B, D, E.
id: '#39',
title: ['B', 'D', 'E'],
total: b(0, 1),
self: b(1),
isLowerBound: true,
children: [
[],
[],
[
{ // B, D, E -> F.
id: '#40',
title: ['B', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
},
{ // B, D, F.
id: '#41',
title: ['B', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
}
],
[
{ // B, *, E.
id: '#42',
title: ['B', undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7),
self: b(7),
isLowerBound: true,
children: [
[],
[
'#35', // B, C, E.
'#39' // B, D, E.
],
[
{ // B, *, E -> F.
id: '#43',
title: ['B', undefined, 'F'],
total: b(0, 3, 6),
self: b(6),
isLowerBound: true,
children: [
[],
[
'#36', // B, C, E -> F.
'#40' // B, D, E -> F.
],
[]
]
}
]
]
},
{ // B, *, F.
id: '#44',
title: ['B', undefined, 'F'],
total: b(0, 3, 6),
self: b(6),
isLowerBound: true,
children: [
[],
[
'#37', // B, C, F.
'#41' // B, D, F.
],
[]
]
}
]
]
}
],
[
{ // *, C, *.
title: [undefined, 'C', undefined],
total: b([0, 5], [9, 14], [18, 23]),
self: b(23),
isLowerBound: true,
children: [
[
'#15', // A, C, *.
'#30' // B, C, *.
],
[
{ // *, C -> D, *.
title: [undefined, 'D', undefined],
total: b([0, 2], [9, 11], [18, 20]),
self: b(20),
isLowerBound: true,
children: [
[
'#16', // A, C -> D, *.
'#31' // B, C -> D, *.
],
[],
[
{ // *, C -> D, E.
id: '#45',
title: [undefined, 'D', 'E'],
total: b(0, 1, 9, 10, 18, 19),
self: b(19),
isLowerBound: true,
children: [
[
'#17', // A, C -> D, E.
'#32' // B, C -> D, E.
],
[],
[
{ // *, C -> D, E -> F.
id: '#46',
title: [undefined, 'D', 'F'],
total: b(0, 9, 18),
self: b(18),
isLowerBound: true,
children: [
[
'#18', // A, C -> D, E -> F.
'#33' // B, C -> D, E -> F.
],
[],
[]
]
}
]
]
},
{ // *, C -> D, F.
id: '#47',
title: [undefined, 'D', 'F'],
total: b(0, 9, 18),
self: b(18),
isLowerBound: true,
children: [
[
'#19', // A, C -> D, F.
'#34' // B, C -> D, F.
],
[],
[]
]
}
]
]
}
],
[
{ // *, C, E.
id: '#48',
title: [undefined, 'C', 'E'],
total: b(0, 1, 3, 4, 9, 10, 12, 13, 18, 19, 21, 22),
self: b(22),
isLowerBound: true,
children: [
[
'#20', // A, C, E.
'#35' // B, C, E.
],
[
'#45' // *, C -> D, E.
],
[
{ // *, C, E -> F.
id: '#49',
title: [undefined, 'C', 'F'],
total: b(0, 3, 9, 12, 18, 21),
self: b(21),
isLowerBound: true,
children: [
[
'#21', // A, C, E -> F.
'#36' // B, C, E -> F.
],
[
'#46' // *, C -> D, E -> F.
],
[]
]
}
]
]
},
{ // *, C, F.
id: '#50',
title: [undefined, 'C', 'F'],
total: b(0, 3, 9, 12, 18, 21),
self: b(21),
isLowerBound: true,
children: [
[
'#22', // A, C, F.
'#37' // B, C, F.
],
[
'#47' // *, C -> D, F.
],
[]
]
}
]
]
},
{ // *, D, *.
title: [undefined, 'D', undefined],
total: b([0, 2], [9, 11], [18, 20]),
self: b(20),
isLowerBound: true,
children: [
[
'#23', // A, D, *.
'#38' // B, D, *.
],
[],
[
{ // *, D, E.
id: '#51',
title: [undefined, 'D', 'E'],
total: b(0, 1, 9, 10, 18, 19),
self: b(19),
isLowerBound: true,
children: [
[
'#24', // A, D, E.
'#39' // B, D, E.
],
[],
[
{ // *, D, E -> F.
id: '#52',
title: [undefined, 'D', 'F'],
total: b(0, 9, 18),
self: b(18),
isLowerBound: true,
children: [
[
'#25', // A, D, E -> F.
'#40' // B, D, E -> F.
],
[],
[]
]
}
]
]
},
{ // *, D, F.
id: '#53',
title: [undefined, 'D', 'F'],
total: b(0, 9, 18),
self: b(18),
isLowerBound: true,
children: [
[
'#26', // A, D, F.
'#41' // B, D, F.
],
[],
[]
]
}
]
]
}
],
[
{ // *, *, E.
title: [undefined, undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22,
24, 25),
self: b(25),
isLowerBound: true,
children: [
[
'#27', // A, *, E.
'#42' // B, *, E.
],
[
'#48', // *, C, E.
'#51' // *, D, E.
],
[
{ // *, *, E -> F.
title: [undefined, undefined, 'F'],
total: b(0, 3, 6, 9, 12, 15, 18, 21, 24),
self: b(24),
isLowerBound: true,
children: [
[
'#28', // A, *, E -> F.
'#43' // B, *, E -> F.
],
[
'#49', // *, C, E -> F.
'#52' // *, D, E -> F.
],
[]
]
}
]
]
},
{ // *, *, F.
title: [undefined, undefined, 'F'],
total: b(0, 3, 6, 9, 12, 15, 18, 21, 24),
self: b(24),
isLowerBound: true,
children: [
[
'#29', // A, *, F.
'#44' // B, *, F.
],
[
'#50', // *, C, F.
'#53' // *, D, F.
],
[]
]
}
]
]
},
{ // Bottom-up heavy view.
title: [undefined, undefined, undefined],
total: b([0, 26]),
self: b(26),
isLowerBound: false,
children: [
[
{ // A, *, *.
title: ['A', undefined, undefined],
total: b([0, 17]),
self: b(17),
isLowerBound: true,
children: [
[],
[
{ // A, C, *.
id: '#0',
title: ['A', 'C', undefined],
total: b([0, 5], [9, 14]),
self: b(14),
isLowerBound: true,
children: [
[],
[],
[
{ // A, C, E.
id: '#1',
title: ['A', 'C', 'E'],
total: b(0, 1, 3, 4, 9, 10, 12, 13),
self: b(13),
isLowerBound: true,
children: [
[],
[],
[]
]
},
{ // A, C, F.
id: '#2',
title: ['A', 'C', 'F'],
total: b(0, 3, 9, 12),
self: b(12),
isLowerBound: true,
children: [
[],
[],
[
{ // A, C, F -> E.
id: '#3',
title: ['A', 'C', 'E'],
total: b(0, 3, 9, 12),
self: b(12),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
}
]
]
},
{ // A, D, *.
id: '#4',
title: ['A', 'D', undefined],
total: b([0, 2], [9, 11]),
self: b(11),
isLowerBound: true,
children: [
[],
[
{ // A, D -> C, *.
id: '#5',
title: ['A', 'C', undefined],
total: b([0, 2], [9, 11]),
self: b(11),
isLowerBound: true,
children: [
[],
[],
[
{ // A, D -> C, E.
id: '#6',
title: ['A', 'C', 'E'],
total: b(0, 1, 9, 10),
self: b(10),
isLowerBound: true,
children: [
[],
[],
[]
]
},
{ // A, D -> C, F.
id: '#7',
title: ['A', 'C', 'F'],
total: b(0, 9),
self: b(9),
isLowerBound: true,
children: [
[],
[],
[
{ // A, D -> C, F -> E.
id: '#8',
title: ['A', 'C', 'E'],
total: b(0, 9),
self: b(9),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // A, D, E.
id: '#9',
title: ['A', 'D', 'E'],
total: b(0, 1, 9, 10),
self: b(10),
isLowerBound: true,
children: [
[],
[
'#6' // A, D -> C, E.
],
[]
]
},
{ // A, D, F.
id: '#10',
title: ['A', 'D', 'F'],
total: b(0, 9),
self: b(9),
isLowerBound: true,
children: [
[],
[
'#7' // A, D -> C, F.
],
[
{ // A, D, F -> E.
id: '#11',
title: ['A', 'D', 'E'],
total: b(0, 9),
self: b(9),
isLowerBound: true,
children: [
[],
[
'#8' // A, D -> C, F -> E.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // A, *, E.
id: '#12',
title: ['A', undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16),
self: b(16),
isLowerBound: true,
children: [
[],
[
'#1', // A, C, E.
'#9' // A, D, E.
],
[]
]
},
{ // A, *, F.
id: '#13',
title: ['A', undefined, 'F'],
total: b(0, 3, 6, 9, 12, 15),
self: b(15),
isLowerBound: true,
children: [
[],
[
'#2', // A, C, F.
'#10' // A, D, F.
],
[
{ // A, *, F -> E.
id: '#14',
title: ['A', undefined, 'E'],
total: b(0, 3, 6, 9, 12, 15),
self: b(15),
isLowerBound: true,
children: [
[],
[
'#3', // A, C, F -> E.
'#11' // A, D, F -> E.
],
[]
]
}
]
]
}
]
]
},
{ // B, *, *.
title: ['B', undefined, undefined],
total: b([0, 8]),
self: b(8),
isLowerBound: true,
children: [
[
{ // B -> A, *, *.
title: ['A', undefined, undefined],
total: b([0, 8]),
self: b(8),
isLowerBound: true,
children: [
[],
[
{ // B -> A, C, *.
id: '#15',
title: ['A', 'C', undefined],
total: b([0, 5]),
self: b(5),
isLowerBound: true,
children: [
[],
[],
[
{ // B -> A, C, E.
id: '#16',
title: ['A', 'C', 'E'],
total: b(0, 1, 3, 4),
self: b(4),
isLowerBound: true,
children: [
[],
[],
[]
]
},
{ // B -> A, C, F.
id: '#17',
title: ['A', 'C', 'F'],
total: b(0, 3),
self: b(3),
isLowerBound: true,
children: [
[],
[],
[
{ // B -> A, C, F -> E.
id: '#18',
title: ['A', 'C', 'E'],
total: b(0, 3),
self: b(3),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
}
]
]
},
{ // B -> A, D, *.
id: '#19',
title: ['A', 'D', undefined],
total: b([0, 2]),
self: b(2),
isLowerBound: true,
children: [
[],
[
{ // B -> A, D -> C, *.
id: '#20',
title: ['A', 'C', undefined],
total: b([0, 2]),
self: b(2),
isLowerBound: true,
children: [
[],
[],
[
{ // B -> A, D -> C, E.
id: '#21',
title: ['A', 'C', 'E'],
total: b(0, 1),
self: b(1),
isLowerBound: true,
children: [
[],
[],
[]
]
},
{ // B -> A, D -> C, F.
id: '#22',
title: ['A', 'C', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[],
[
{ // B -> A, D -> C, F -> E.
id: '#23',
title: ['A', 'C', 'E'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // B -> A, D, E.
id: '#24',
title: ['A', 'D', 'E'],
total: b(0, 1),
self: b(1),
isLowerBound: true,
children: [
[],
[
'#21' // B -> A, D -> C, E.
],
[]
]
},
{ // B -> A, D, F.
id: '#25',
title: ['A', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[
'#22' // B -> A, D -> C, F.
],
[
{ // B -> A, D, F -> E.
id: '#26',
title: ['A', 'D', 'E'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[],
[
'#23' // B -> A, D -> C, F -> E.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // B -> A, *, E.
id: '#27',
title: ['A', undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7),
self: b(7),
isLowerBound: true,
children: [
[],
[
'#16', // B -> A, C, E.
'#24' // B -> A, D, E.
],
[]
]
},
{ // B -> A, *, F.
id: '#28',
title: ['A', undefined, 'F'],
total: b(0, 3, 6),
self: b(6),
isLowerBound: true,
children: [
[],
[
'#17', // B -> A, C, F.
'#25' // B -> A, D, F.
],
[
{ // B -> A, *, F -> E.
id: '#29',
title: ['A', undefined, 'E'],
total: b(0, 3, 6),
self: b(6),
isLowerBound: true,
children: [
[],
[
'#18', // B -> A, C, F -> E.
'#26' // B -> A, D, F -> E.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // B, C, *.
id: '#30',
title: ['B', 'C', undefined],
total: b([0, 5]),
self: b(5),
isLowerBound: true,
children: [
[
'#15' // B -> A, C, *.
],
[],
[
{ // B, C, E.
id: '#31',
title: ['B', 'C', 'E'],
total: b(0, 1, 3, 4),
self: b(4),
isLowerBound: true,
children: [
[
'#16' // B -> A, C, E.
],
[],
[]
]
},
{ // B, C, F.
id: '#32',
title: ['B', 'C', 'F'],
total: b(0, 3),
self: b(3),
isLowerBound: true,
children: [
[
'#17' // B -> A, C, F.
],
[],
[
{ // B, C, F -> E.
id: '#33',
title: ['B', 'C', 'E'],
total: b(0, 3),
self: b(3),
isLowerBound: true,
children: [
[
'#18' // B -> A, C, F -> E.
],
[],
[]
]
}
]
]
}
]
]
},
{ // B, D, *.
id: '#34',
title: ['B', 'D', undefined],
total: b([0, 2]),
self: b(2),
isLowerBound: true,
children: [
[
'#19' // B -> A, D, *.
],
[
{ // B, D -> C, *.
id: '#35',
title: ['B', 'C', undefined],
total: b([0, 2]),
self: b(2),
isLowerBound: true,
children: [
[
'#20' // B -> A, D -> C, *.
],
[],
[
{ // B, D -> C, E.
id: '#36',
title: ['B', 'C', 'E'],
total: b(0, 1),
self: b(1),
isLowerBound: true,
children: [
[
'#21' // B -> A, D -> C, E.
],
[],
[]
]
},
{ // B, D -> C, F.
id: '#37',
title: ['B', 'C', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[
'#22' // B -> A, D -> C, F.
],
[],
[
{ // B, D -> C, F -> E.
id: '#38',
title: ['B', 'C', 'E'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[
'#23' // B -> A, D -> C, F -> E.
],
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // B, D, E.
id: '#39',
title: ['B', 'D', 'E'],
total: b(0, 1),
self: b(1),
isLowerBound: true,
children: [
[
'#24' // B -> A, D, E.
],
[
'#36' // B, D -> C, E.
],
[]
]
},
{ // B, D, F.
id: '#40',
title: ['B', 'D', 'F'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[
'#25' // B -> A, D, F.
],
[
'#37' // B, D -> C, F.
],
[
{ // B, D, F -> E.
id: '#41',
title: ['B', 'D', 'E'],
total: b(0),
self: b(0),
isLowerBound: true,
children: [
[
'#26' // B -> A, D, F -> E.
],
[
'#38' // B, D -> C, F -> E.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // B, *, E.
id: '#42',
title: ['B', undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7),
self: b(7),
isLowerBound: true,
children: [
[
'#27' // B -> A, *, E.
],
[
'#31', // B, C, E.
'#39' // B, D, E.
],
[]
]
},
{ // B, *, F.
id: '#43',
title: ['B', undefined, 'F'],
total: b(0, 3, 6),
self: b(6),
isLowerBound: true,
children: [
[
'#28' // B -> A, *, F.
],
[
'#32', // B, C, F.
'#40' // B, D, F.
],
[
{ // B, *, F -> E.
id: '#44',
title: ['B', undefined, 'E'],
total: b(0, 3, 6),
self: b(6),
isLowerBound: true,
children: [
[
'#29' // B -> A, *, F -> E.
],
[
'#33', // B, C, F -> E.
'#41' // B, D, F -> E.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, C, *.
title: [undefined, 'C', undefined],
total: b([0, 5], [9, 14], [18, 23]),
self: b(23),
isLowerBound: true,
children: [
[
'#0', // A, C, *.
'#30' // B, C, *.
],
[],
[
{ // *, C, E.
id: '#45',
title: [undefined, 'C', 'E'],
total: b(0, 1, 3, 4, 9, 10, 12, 13, 18, 19, 21, 22),
self: b(22),
isLowerBound: true,
children: [
[
'#1', // A, C, E.
'#31' // B, C, E.
],
[],
[]
]
},
{ // *, C, F.
id: '#46',
title: [undefined, 'C', 'F'],
total: b(0, 3, 9, 12, 18, 21),
self: b(21),
isLowerBound: true,
children: [
[
'#2', // A, C, F.
'#32' // B, C, F.
],
[],
[
{ // *, C, F -> E.
id: '#47',
title: [undefined, 'C', 'E'],
total: b(0, 3, 9, 12, 18, 21),
self: b(21),
isLowerBound: true,
children: [
[
'#3', // A, C, F -> E.
'#33' // B, C, F -> E.
],
[],
[]
]
}
]
]
}
]
]
},
{ // *, D, *.
title: [undefined, 'D', undefined],
total: b([0, 2], [9, 11], [18, 20]),
self: b(20),
isLowerBound: true,
children: [
[
'#4', // A, D, *.
'#34' // B, D, *.
],
[
{ // *, D -> C, *.
title: [undefined, 'C', undefined],
total: b([0, 2], [9, 11], [18, 20]),
self: b(20),
isLowerBound: true,
children: [
[
'#5', // A, D -> C, *.
'#35' // B, D -> C, *.
],
[],
[
{ // *, D -> C, E.
id: '#48',
title: [undefined, 'C', 'E'],
total: b(0, 1, 9, 10, 18, 19),
self: b(19),
isLowerBound: true,
children: [
[
'#6', // A, D -> C, E.
'#36' // B, D -> C, E.
],
[],
[]
]
},
{ // *, D -> C, F.
id: '#49',
title: [undefined, 'C', 'F'],
total: b(0, 9, 18),
self: b(18),
isLowerBound: true,
children: [
[
'#7', // A, D -> C, F.
'#37' // B, D -> C, F.
],
[],
[
{ // *, D -> C, F -> E.
id: '#50',
title: [undefined, 'C', 'E'],
total: b(0, 9, 18),
self: b(18),
isLowerBound: true,
children: [
[
'#8', // A, D -> C, F -> E.
'#38' // B, D -> C, F -> E.
],
[],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, D, E.
id: '#51',
title: [undefined, 'D', 'E'],
total: b(0, 1, 9, 10, 18, 19),
self: b(19),
isLowerBound: true,
children: [
[
'#9', // A, D, E.
'#39' // B, D, E.
],
[
'#48' // *, D -> C, E.
],
[]
]
},
{ // *, D, F.
id: '#52',
title: [undefined, 'D', 'F'],
total: b(0, 9, 18),
self: b(18),
isLowerBound: true,
children: [
[
'#10', // A, D, F.
'#40' // B, D, F.
],
[
'#49' // *, D -> C, F.
],
[
{ // *, D, F -> E.
id: '#53',
title: [undefined, 'D', 'E'],
total: b(0, 9, 18),
self: b(18),
isLowerBound: true,
children: [
[
'#11', // A, D, F -> E.
'#41' // B, D, F -> E.
],
[
'#50' // *, D -> C, F -> E.
],
[]
]
}
]
]
}
]
]
}
],
[
{ // *, *, E.
title: [undefined, undefined, 'E'],
total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22,
24, 25),
self: b(25),
isLowerBound: true,
children: [
[
'#12', // A, *, E.
'#42' // B, *, E.
],
[
'#45', // *, C, E.
'#51' // *, D, E.
],
[]
]
},
{ // *, *, F.
title: [undefined, undefined, 'F'],
total: b(0, 3, 6, 9, 12, 15, 18, 21, 24),
self: b(24),
isLowerBound: true,
children: [
[
'#13', // A, *, F.
'#43' // B, *, F.
],
[
'#46', // *, C, F.
'#52' // *, D, F.
],
[
{ // *, *, F -> E.
title: [undefined, undefined, 'E'],
total: b(0, 3, 6, 9, 12, 15, 18, 21, 24),
self: b(24),
isLowerBound: true,
children: [
[
'#14', // A, *, F -> E.
'#44' // B, *, F -> E.
],
[
'#47', // *, C, F -> E.
'#53' // *, D, F -> E.
],
[]
]
}
]
]
}
]
]
});
test('recursionDepthTracker', function() {
var MAX_DEPTH = 5;
var tracker = new RecursionDepthTracker(MAX_DEPTH, 2 /* dimension */);
function pushNewNode(title) {
var node = new MultiDimensionalViewNode(
[undefined, 'ignored dimension', title, 'also ignored'],
false /* isLowerBound (not relevant for this test) */);
tracker.push(node);
return node;
}
function checkTracker(expectedDefinedViewNodePath, expectedRecursionDepth) {
var expectedBottomIndex = MAX_DEPTH - expectedDefinedViewNodePath.length;
assert.strictEqual(tracker.bottomIndex, expectedBottomIndex);
assert.strictEqual(tracker.topIndex, MAX_DEPTH);
var undefinedPadding = new Array(expectedBottomIndex);
var expectedViewNodePath =
undefinedPadding.concat(expectedDefinedViewNodePath);
var expectedTitlePath =
undefinedPadding.concat(expectedDefinedViewNodePath.map(
function(node) { return node.title[2]; }));
assertListStrictEqual(tracker.viewNodePath, expectedViewNodePath);
assertListStrictEqual(tracker.titlePath, expectedTitlePath);
assert.strictEqual(tracker.recursionDepth, expectedRecursionDepth);
}
checkTracker([] /* empty stack */, 0);
var a1 = pushNewNode('A');
checkTracker([a1], 0);
var b1 = pushNewNode('B');
checkTracker([b1, a1], 0);
var c1 = pushNewNode('C');
checkTracker([c1, b1, a1], 0);
var d1 = pushNewNode('D');
checkTracker([d1, c1, b1, a1], 0);
tracker.pop();
checkTracker([c1, b1, a1], 0);
var a2 = pushNewNode('A');
checkTracker([a2, c1, b1, a1], 1);
var b2 = pushNewNode('B');
checkTracker([b2, a2, c1, b1, a1], 2);
tracker.pop();
checkTracker([a2, c1, b1, a1], 1);
tracker.pop();
checkTracker([c1, b1, a1], 0);
tracker.push(b2);
checkTracker([b2, c1, b1, a1], 1);
tracker.pop();
checkTracker([c1, b1, a1], 0);
tracker.pop();
checkTracker([b1, a1], 0);
tracker.pop();
checkTracker([a1], 0);
var a3 = pushNewNode('A');
checkTracker([a3, a1], 1);
tracker.push(a2);
checkTracker([a2, a3, a1], 2);
var a4 = pushNewNode('A');
checkTracker([a4, a2, a3, a1], 3);
tracker.pop();
checkTracker([a2, a3, a1], 2);
var b3 = pushNewNode('B');
checkTracker([b3, a2, a3, a1], 0);
tracker.push(a4);
checkTracker([a4, b3, a2, a3, a1], 1);
tracker.pop();
checkTracker([b3, a2, a3, a1], 0);
tracker.pop();
checkTracker([a2, a3, a1], 2);
tracker.pop();
checkTracker([a3, a1], 1);
tracker.pop();
checkTracker([a1], 0);
tracker.pop();
checkTracker([], 0);
tracker.push(a4);
checkTracker([a4], 0);
tracker.push(b1);
checkTracker([b1, a4], 0);
tracker.push(a1);
checkTracker([a1, b1, a4], 1);
tracker.pop();
checkTracker([b1, a4], 0);
var c2 = pushNewNode('C');
checkTracker([c2, b1, a4], 0);
tracker.push(a3);
checkTracker([a3, c2, b1, a4], 1);
tracker.pop();
checkTracker([c2, b1, a4], 0);
tracker.pop();
checkTracker([b1, a4], 0);
tracker.pop();
checkTracker([a4], 0);
tracker.pop();
checkTracker([], 0);
assert.throws(function() {
// Try popping from an empty tracker.
tracker.pop();
});
pushNewNode('F');
pushNewNode('U');
pushNewNode('L');
pushNewNode('L');
pushNewNode('!');
assert.throws(function() {
// Try pushing to a full tracker.
pushNewNode(':-(');
});
});
test('zFunction', function() {
// Empty list/string (suffix).
assert.deepEqual(zFunction([], 0), []);
assert.deepEqual(zFunction(['A'], 1), []);
assert.deepEqual(zFunction(['A', 'B', 'C'], 3), []);
assert.deepEqual(zFunction('', 0), []);
assert.deepEqual(zFunction('A', 1), []);
assert.deepEqual(zFunction('ABC', 3), []);
// Singleton list/string.
checkZFunction([1], [0]);
checkZFunction('T', [0]);
// No duplicate elements.
checkZFunction([1, 2, 3, 4, 5], [0, 0, 0, 0, 0]);
checkZFunction('ABCDEF', [0, 0, 0, 0, 0, 0]);
// No substring is a suffix.
checkZFunction([1, 2, 3, 2], [0, 0, 0, 0]);
checkZFunction('ABBB', [0, 0, 0, 0]);
// Pure repetition.
checkZFunction([1, 1, 1, 1, 1], [0, 4, 3, 2, 1]);
checkZFunction('AAAAA', [0, 4, 3, 2, 1]);
// Interleaved repetition.
checkZFunction([1, 2, 1, 3, 1, 2, 1], [0, 0, 1, 0, 3, 0, 1]);
checkZFunction('AAABAAB', [0, 2, 1, 0, 2, 1, 0]);
// Complex patterns.
checkZFunction([7, 9, 7, 9, 7, 9, 7, 9], [0, 0, 6, 0, 4, 0, 2, 0]);
checkZFunction('CCGTCCCGTACC', [0, 1, 0, 0, 2, 4, 1, 0, 0, 0, 2, 1]);
});
});
</script>