stacks-to-json-stack-tree

Convert dtrace/perf stack samples into a JSON tree

Apache 2.0 3 个版本
安装
npm install stacks-to-json-stack-tree
yarn add stacks-to-json-stack-tree
pnpm add stacks-to-json-stack-tree
bun add stacks-to-json-stack-tree
README

stacks-to-json-stack-tree

Convert dtrace/perf stack samples into a JSON tree

Installation

npm install stacks-to-json-stack-tree --save

Usage

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)

Dependencies

  • debug: small debugging utility
  • end-of-stream: Call a callback when a readable/writable/duplex stream has completed or failed.
  • through2: A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise

Dev Dependencies

None

License

Apache 2.0

版本列表
1.0.2 2018-02-26
1.0.1 2018-02-26
1.0.0 2018-02-26