Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-viz

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-viz - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

dot.js

@@ -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",

@@ -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}');
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc