broccoli-viz
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -7,3 +7,3 @@ // usage: DUMP_BROCCOLI_TREES=true broccoli serve | ||
function formatTime(time) { | ||
return Math.floor(time / 1e6) +'ms'; | ||
return Math.floor(time / 1e6) + 'ms'; | ||
} | ||
@@ -22,5 +22,5 @@ | ||
annotation = annotation.replace('(', '\n('); | ||
out += ' [shape=box, label=" ' + node.id + ' ' + ' (' + formatTime(node.selfTime) + ') \n' + annotation + '" ]'; | ||
out += ' [shape=box, label=" ' + node.id + ' ' + '\n self time (' + formatTime(node.selfTime) + ') \n total time (' + formatTime(node.totalTime) + ')\n' + annotation + '" ]'; | ||
} else { | ||
out += ' [shape=circle, style="dotted", label=" ' + node.id + ' (' + formatTime(node.selfTime) + ') " ]'; | ||
out += ' [shape=circle, style="dotted", label=" ' + node.id + ' self time (' + formatTime(node.selfTime) + ')\n total time (' + formatTime(node.totalTime) + ')" ]'; | ||
} | ||
@@ -27,0 +27,0 @@ |
{ | ||
"name": "broccoli-viz", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
19
test.js
@@ -53,3 +53,5 @@ var flatten = require('./flatten'); | ||
id: 'a', | ||
subtrees: [] | ||
subtrees: [], | ||
selfTime: 1000000, | ||
totalTime: 1000000 | ||
}); | ||
@@ -59,4 +61,17 @@ | ||
assert.equal(result, 'digraph G {ratio = \"auto\"a [shape=circle, style=\"dotted\", label=\" a (NaNms) \" ]\n}'); | ||
assert.equal(result, 'digraph G {ratio = \"auto\"a [shape=circle, style=\"dotted\", label=\" a self time (1ms)\n total time (1ms)\" ]\n}'); | ||
}); | ||
it('works with self and total time', function(){ | ||
var a = node({ | ||
id: 'a', | ||
subtrees: [], | ||
selfTime: 1000000, | ||
totalTime: 1000000 | ||
}); | ||
var result = dot(flatten(a)); | ||
assert.equal(result, 'digraph G {ratio = \"auto\"a [shape=circle, style=\"dotted\", label=\" a self time (1ms)\n total time (1ms)\" ]\n}'); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4969
138
1