Skip to content

davidmarkclements/stacks-to-json-stack-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Convert dtrace/perf stack samples into a JSON tree

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published