$ npm install stacks-to-json-stack-tree
Convert dtrace/perf stack samples into a JSON tree
npm install stacks-to-json-stack-tree --save
var fs = require('fs')
var stacksToJsonStackTree = require('stacks-to-json-stack-tree')
var mapFrames = (frames, instance) => frames // mapFrames is optional
var convertAndCollectFromStream = stacksToJsonStackTree(mapFrames, function (err, json) {
if (err) throw err
console.log(json)
})
fs.createReadStream('path/to/stacks').pipe(convertAndCollectFromStream)
None
Apache 2.0
© 2010 - cnpmjs.org x YWFE | Home | YWFE