{"_id":"stackvis","_rev":"4251542","name":"stackvis","description":"stack visualization tools","dist-tags":{"latest":"0.5.0"},"maintainers":[{"name":"bahamat","email":""},{"name":"dap","email":""},{"name":"kebesays","email":""},{"name":"kusor","email":""},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"tpaul","email":""}],"time":{"modified":"2026-03-31T23:45:37.000Z","created":"2012-04-24T04:16:57.729Z","0.5.0":"2017-07-22T00:19:09.301Z","0.4.0":"2016-09-22T21:47:03.816Z","0.3.0":"2015-07-29T22:51:03.747Z","0.2.0":"2013-10-17T22:51:37.959Z","0.1.1":"2013-08-06T17:37:45.438Z","0.1.0":"2012-11-26T02:26:06.509Z","0.0.3":"2012-04-27T00:46:10.676Z","0.0.2":"2012-04-24T05:32:29.565Z","0.0.1":"2012-04-24T04:16:57.729Z"},"users":{},"repository":{"type":"git","url":"git://github.com/davepacheco/node-stackvis.git"},"versions":{"0.5.0":{"name":"stackvis","version":"0.5.0","description":"stack visualization tools","main":"./lib/stackvis.js","bin":{"flamegraph":"./cmd/flamegraph","stackcollapse":"./cmd/stackcollapse","stackcollapse-perf":"./cmd/stackcollapse-perf","stackcollapse-stap":"./cmd/stackcollapse-stap","stackvis":"./cmd/stackvis"},"repository":{"type":"git","url":"git://github.com/davepacheco/node-stackvis.git"},"dependencies":{"bunyan":"1.8.1","carrier":"0.1.7","hogan.js":"2.0.0","manta":"3.0.0","node-uuid":"1.4.1","posix-getopt":"1.0.0","vasync":"1.4.0","verror":"1.3.6","jsprim":"0.5.1"},"license":"MIT","gitHead":"79fba1c7c459b2663d6cc95e1a531c4345528866","bugs":{"url":"https://github.com/davepacheco/node-stackvis/issues"},"homepage":"https://github.com/davepacheco/node-stackvis#readme","_id":"stackvis@0.5.0","scripts":{},"_shasum":"47fa2d1143dce896bd5eda033cd9dbd808384b24","_from":".","_npmVersion":"2.15.1","_nodeVersion":"0.10.45","_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"maintainers":[{"name":"bahamat","email":""},{"name":"dap","email":""},{"name":"kebesays","email":""},{"name":"kusor","email":""},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"tpaul","email":""}],"dist":{"shasum":"47fa2d1143dce896bd5eda033cd9dbd808384b24","size":90577,"noattachment":false,"key":"/stackvis/-/stackvis-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stackvis/download/stackvis-0.5.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stackvis-0.5.0.tgz_1500682749197_0.45072844019159675"},"directories":{},"publish_time":1500682749301,"_hasShrinkwrap":false,"_cnpm_publish_time":1500682749301,"_cnpmcore_publish_time":"2021-12-16T20:00:01.233Z"},"0.4.0":{"name":"stackvis","version":"0.4.0","description":"stack visualization tools","main":"./lib/stackvis.js","bin":{"flamegraph":"./cmd/flamegraph","stackcollapse":"./cmd/stackcollapse","stackcollapse-perf":"./cmd/stackcollapse-perf","stackcollapse-stap":"./cmd/stackcollapse-stap","stackvis":"./cmd/stackvis"},"repository":{"type":"git","url":"git://github.com/davepacheco/node-stackvis.git"},"dependencies":{"bunyan":"1.8.1","carrier":"0.1.7","hogan.js":"2.0.0","manta":"3.0.0","node-uuid":"1.4.1","posix-getopt":"1.0.0","vasync":"1.4.0","verror":"1.3.6","jsprim":"0.5.1"},"license":"MIT","gitHead":"2494b1948956280811dbf8a6b645701f78fc0426","bugs":{"url":"https://github.com/davepacheco/node-stackvis/issues"},"homepage":"https://github.com/davepacheco/node-stackvis","_id":"stackvis@0.4.0","scripts":{},"_shasum":"1555b275c24bf6e4c5b55b25d820b569d8398c89","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"maintainers":[{"name":"bahamat","email":""},{"name":"dap","email":""},{"name":"kebesays","email":""},{"name":"kusor","email":""},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"tpaul","email":""}],"dist":{"shasum":"1555b275c24bf6e4c5b55b25d820b569d8398c89","size":90584,"noattachment":false,"key":"/stackvis/-/stackvis-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stackvis/download/stackvis-0.4.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/stackvis-0.4.0.tgz_1474580823587_0.5919427897315472"},"directories":{},"publish_time":1474580823816,"_hasShrinkwrap":false,"_cnpm_publish_time":1474580823816,"_cnpmcore_publish_time":"2021-12-16T20:00:01.730Z"},"0.3.0":{"name":"stackvis","version":"0.3.0","description":"stack visualization tools","main":"./lib/stackvis.js","bin":{"flamegraph":"./cmd/flamegraph","stackcollapse":"./cmd/stackcollapse","stackcollapse-perf":"./cmd/stackcollapse-perf","stackcollapse-stap":"./cmd/stackcollapse-stap","stackvis":"./cmd/stackvis"},"repository":{"type":"git","url":"git://github.com/davepacheco/node-stackvis.git"},"dependencies":{"bunyan":"0.21.4","carrier":"0.1.7","hogan.js":"2.0.0","manta":"1.5.1","node-uuid":"1.4.1","posix-getopt":"1.0.0","vasync":"1.4.0","verror":"1.3.6","jsprim":"0.5.1"},"license":"MIT","gitHead":"b129a8bcdc2f8e840a658f4f9d87ab1254237dd0","bugs":{"url":"https://github.com/davepacheco/node-stackvis/issues"},"homepage":"https://github.com/davepacheco/node-stackvis","_id":"stackvis@0.3.0","scripts":{},"_shasum":"859d324c139836d086289fb33b5178fe25243f13","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"maintainers":[{"name":"bahamat","email":""},{"name":"dap","email":""},{"name":"kebesays","email":""},{"name":"kusor","email":""},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"tpaul","email":""}],"dist":{"shasum":"859d324c139836d086289fb33b5178fe25243f13","size":90570,"noattachment":false,"key":"/stackvis/-/stackvis-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stackvis/download/stackvis-0.3.0.tgz"},"directories":{},"publish_time":1438210263747,"_hasShrinkwrap":false,"_cnpm_publish_time":1438210263747,"_cnpmcore_publish_time":"2021-12-16T20:00:02.234Z"},"0.2.0":{"name":"stackvis","version":"0.2.0","description":"stack visualization tools","main":"./lib/stackvis.js","bin":{"flamegraph":"./cmd/flamegraph","stackcollapse":"./cmd/stackcollapse","stackcollapse-perf":"./cmd/stackcollapse-perf","stackcollapse-stap":"./cmd/stackcollapse-stap","stackvis":"./cmd/stackvis"},"repository":{"type":"git","url":"git://github.com/davepacheco/node-stackvis.git"},"dependencies":{"bunyan":"0.21.4","carrier":"0.1.7","hogan.js":"2.0.0","manta":"1.1.2","node-uuid":"1.4.1","posix-getopt":"1.0.0","vasync":"1.4.0","verror":"1.3.6"},"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/davepacheco/node-stackvis/issues"},"_id":"stackvis@0.2.0","dist":{"shasum":"e74eedd1fff606881ba6c32bcd388f7b7d7c643f","size":90513,"noattachment":false,"key":"/stackvis/-/stackvis-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stackvis/download/stackvis-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"maintainers":[{"name":"bahamat","email":""},{"name":"dap","email":""},{"name":"kebesays","email":""},{"name":"kusor","email":""},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"tpaul","email":""}],"directories":{},"publish_time":1382050297959,"_hasShrinkwrap":false,"_cnpm_publish_time":1382050297959,"_cnpmcore_publish_time":"2021-12-16T20:00:03.021Z"},"0.1.1":{"name":"stackvis","version":"0.1.1","description":"stack visualization tools","main":"./lib/stackvis.js","bin":{"flamegraph":"./cmd/flamegraph","stackcollapse":"./cmd/stackcollapse","stackcollapse-perf":"./cmd/stackcollapse-perf","stackcollapse-stap":"./cmd/stackcollapse-stap","stackvis":"./cmd/stackvis"},"repository":{"type":"git","url":"git://github.com/davepacheco/node-stackvis.git"},"dependencies":{"bunyan":"0.21.4","carrier":"0.1.7"},"readmeFilename":"README.md","_id":"stackvis@0.1.1","dist":{"shasum":"93c9ac366635f22bba0c453da42ee09ad5227510","size":953654,"noattachment":false,"key":"/stackvis/-/stackvis-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stackvis/download/stackvis-0.1.1.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"maintainers":[{"name":"bahamat","email":""},{"name":"dap","email":""},{"name":"kebesays","email":""},{"name":"kusor","email":""},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"tpaul","email":""}],"directories":{},"publish_time":1375810665438,"_hasShrinkwrap":false,"_cnpm_publish_time":1375810665438,"_cnpmcore_publish_time":"2021-12-16T20:00:06.920Z"},"0.1.0":{"name":"stackvis","version":"0.1.0","description":"stack visualization tools","main":"./lib/stackvis.js","bin":{"flamegraph":"./cmd/flamegraph","stackcollapse":"./cmd/stackcollapse","stackcollapse-perf":"./cmd/stackcollapse-perf","stackcollapse-stap":"./cmd/stackcollapse-stap","stackvis":"./cmd/stackvis"},"repository":{"type":"git","url":"git://github.com/davepacheco/node-stackvis.git"},"dependencies":{"bunyan":"0.16.7","carrier":"0.1.7"},"_id":"stackvis@0.1.0","dist":{"shasum":"6c13ff26dde2b06fb58f9fa947ab2177c70ff6d4","size":90731,"noattachment":false,"key":"/stackvis/-/stackvis-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stackvis/download/stackvis-0.1.0.tgz"},"maintainers":[{"name":"bahamat","email":""},{"name":"dap","email":""},{"name":"kebesays","email":""},{"name":"kusor","email":""},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"tpaul","email":""}],"directories":{},"publish_time":1353896766509,"_hasShrinkwrap":false,"_cnpm_publish_time":1353896766509,"_cnpmcore_publish_time":"2021-12-16T20:00:07.591Z"},"0.0.3":{"name":"stackvis","version":"0.0.3","description":"stack visualization tools","main":"./lib/stackvis.js","bin":{"flamegraph":"./cmd/flamegraph","stackcollapse":"./cmd/stackcollapse","stackvis":"./cmd/stackvis"},"repository":{"type":"git","url":"git://github.com/davepacheco/stackvis.git"},"dependencies":{"bunyan":"0.6.8","carrier":"0.1.7"},"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"_id":"stackvis@0.0.3","devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.16-pre","_defaultsLoaded":true,"dist":{"shasum":"55a58e0b87709cc4f6ab19a27e8a41fafca7813e","size":87104,"noattachment":false,"key":"/stackvis/-/stackvis-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/stackvis/download/stackvis-0.0.3.tgz"},"maintainers":[{"name":"bahamat","email":""},{"name":"dap","email":""},{"name":"kebesays","email":""},{"name":"kusor","email":""},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"tpaul","email":""}],"directories":{},"publish_time":1335487570676,"_hasShrinkwrap":false,"_cnpm_publish_time":1335487570676,"_cnpmcore_publish_time":"2021-12-16T20:00:08.051Z"},"0.0.2":{"name":"stackvis","version":"0.0.2","description":"stack visualization tools","main":"./lib/stackvis.js","bin":{"flamegraph":"./cmd/flamegraph","stackcollapse":"./cmd/stackcollapse","stackvis":"./cmd/stackvis"},"repository":{"type":"git","url":"git://github.com/davepacheco/stackvis.git"},"dependencies":{"bunyan":"0.6.8","carrier":"0.1.7"},"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"_id":"stackvis@0.0.2","devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.12","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"954b8a5bbea7a914fe557c67aea1294c6fe356cf","size":87909,"noattachment":false,"key":"/stackvis/-/stackvis-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stackvis/download/stackvis-0.0.2.tgz"},"maintainers":[{"name":"bahamat","email":""},{"name":"dap","email":""},{"name":"kebesays","email":""},{"name":"kusor","email":""},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"tpaul","email":""}],"directories":{},"publish_time":1335245549565,"_hasShrinkwrap":false,"_cnpm_publish_time":1335245549565,"_cnpmcore_publish_time":"2021-12-16T20:00:08.795Z"},"0.0.1":{"name":"stackvis","version":"0.0.1","description":"stack visualization tools","main":"./lib/stackvis.js","bin":{"flamegraph":"./cmd/flamegraph","stackcollapse":"./cmd/stackcollapse","stackvis":"./cmd/stackvis"},"repository":{"type":"git","url":"git://github.com/davepacheco/stackvis.git"},"dependencies":{"bunyan":"0.6.8","carrier":"0.1.7"},"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"_id":"stackvis@0.0.1","devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.12","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"33912520e97e08cdd6af38e0d421240cc3c9f71d","size":87809,"noattachment":false,"key":"/stackvis/-/stackvis-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stackvis/download/stackvis-0.0.1.tgz"},"maintainers":[{"name":"bahamat","email":""},{"name":"dap","email":""},{"name":"kebesays","email":""},{"name":"kusor","email":""},{"name":"michael.hicks","email":"michael.hicks@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"tpaul","email":""}],"directories":{},"publish_time":1335241017729,"_hasShrinkwrap":false,"_cnpm_publish_time":1335241017729,"_cnpmcore_publish_time":"2021-12-16T20:00:10.097Z"}},"readme":"# node-stackvis\n\nStackvis is a command line tool and JavaScript library for visualizing call\nstacks.  For an example, see\nhttp://us-east.manta.joyent.com/dap/public/stackvis/example.htm.  This approach\n(and the code for the SVG-based flamegraph) is based heavily on Brendan Gregg's\n[FlameGraph](http://github.com/brendangregg/FlameGraph/) tools.\n\n\n## Synopsis\n\nProfile a program for 30 seconds:\n\n    # dtrace -n 'profile-97/pid == $YOURPID/{ @[jstack(80, 8192)] = count(); }' -c \"sleep 30\" > dtrace.out\n\nthen translate the DTrace output into a flame graph:\n\n    # stackvis < dtrace.out > flamegraph.htm\n\nOr, create the flame graph and share it on Joyent's Manta service:\n\n    # stackvis < dtrace.out | stackvis share\n    https://us-east.manta.joyent.com/dap/public/stackvis/298c9ae2-aec8-4993-8bc9-d621dcdbeb71/index.htm\n\n\n## Details\n\nThe default mode assumes input from a DTrace invocation like the above, and\nproduces a D3-based visualization in a self-contained HTML file.  You can\nexplicitly specify input formats:\n\n* \"dtrace\" (the default)\n* \"collapsed\" (more easily grep'd through)\n* \"perf\" (from the Linux \"perf\" tool)\n* \"stap\" (from SystemTap)\n\nas well as output formats:\n\n* \"collapsed\" (see above)\n* \"flamegraph-svg\" (traditional SVG-based flame graph)\n* \"flamegraph-d3\" (the default)\n\nFor example, to read \"collapsed\" output and produce a SVG flamegraph, use:\n\n    # stackvis collapsed flamegraph-svg < collapsed.out > flamegraph.svg\n\nThis module also provides the \"stackcollapse\" and \"flamegraph\" tools, which are\nessentially direct ports of the original FlameGraph tools.  You can use them by\nfirst collecting data as above, then collapse common stacks:\n\n    # stackcollapse < dtrace.out > collapsed.out\n\nthen create a flame graph:\n\n    # flamegraph < collapsed.out > graph.svg\n\nThis approach is a little more verbose, but lets you filter out particular\nfunction names by grepping through the collapsed file.\n\n\n## API\n\nThe command-line tools are thin wrappers around the API, which is built upon a\nsimple internal representation of stack traces and a bunch of Readers\n(lib/input-\\*.json) and Writers (lib/output-\\*.json) for various intermediate\nformats:\n\n- input-dtrace.js: reads stacks from the output of a DTrace profiling script\n- input-collapsed.js: reads data in the form used by the \"stackcollapse\" tool,\n  where function offsets are stripped out, common stacks are collapsed, and\n  there's one stack per line.\n- output-collapsed.js: writes stacks in above \"collapsed\" form\n- output-flamegraph-svg.js: writes stacks as a flame graph SVG\n- output-flamegraph-d3.js: writes stacks as a flame graph HTML file using D3\n\nClient code shouldn't load these directly.  Instead, require 'stackvis' and use\nlookupReader and lookupWriter:\n```javascript\nvar mod_stackvis = require('stackvis');\nvar dtrace_reader = mod_stackvis.readerLookup('dtrace');\nvar collapsed_writer = mod_stackvis.writerLookup('collapsed');\n```\nThe main operation is translating from one representation to another (e.g.,\nDTrace output to a flame graph) using pipeStacks() (which requires a Bunyan\nlogger):\n```javascript\nvar mod_bunyan = require('bunyan');\nvar log = new mod_bunyan({ 'name': 'mytool', 'stream': process.stderr });\nmod_stackvis.pipeStacks(log, process.stdin, dtrace_reader, collapsed_writer,\n    process.stdout, function () { console.error('translation finished'); });\n```\nThis example instantiates a new dtrace_reader to read DTrace output from\nprocess.stdin and then emits the result in collapsed form to process.stdout\nthrough the collapsed_writer.\n\n## Adding new readers and writers\n\nIt's easy to add new readers (for new input sources) and writers (for new types\nof visualizations).  See lib/stackvis.js for an overview of how these interfaces\nwork.\n\n## TODO\n\n- See about dealing with multiple \"silos\" of a single flame graph that are\n  essentially the same, but differ in exactly one frame.\n- Experiment with flame graph coloring.  Current options include random,\n  gradient, and time-based.  Another possibility is to use hue to denote the\n  module and saturation to denote the size of a frame relative to others at the\n  same level of depth.\n","_attachments":{},"homepage":"https://github.com/davepacheco/node-stackvis#readme","bugs":{"url":"https://github.com/davepacheco/node-stackvis/issues"},"license":"MIT"}