Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

spiermar/node-stack-convert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stack-convert

stackconvert is a CLI tool to convert perf script stacks to a JSON hierarchical data structure that can be consumed by d3-flame-graph.

Getting Started

stackconvert is available from npm and can be installed using the following command.

$ npm install stack-convert -g

Once the tool is installed, it can be used in the CLI.

$ stackconvert perf.script.txt > perf.json

Where:

perf.script.txt is the output file from perf script you want to convert

Options

Collapsed/Folded Stacks

The tool can also be used with collapsed/folded stacks generated by @brendangregg, stackcollapse-perf.pl script.

$ stackconvert --folded perf.data-folded > perf.json

Live Flame Graphs

The tool can be used to generate input for live flame graphs by adding a time dimension to the output. In this case, the input file must be the multiline perf script output, not the folded/collapsed stacks, since those do not contain timestamps.

$ stackconvert --live perf.data > perf.json

Examples

Input and Output examples can be found in the examples directory.

Issues

For bugs, questions and discussions please use the GitHub Issues.

Contributing

We love contributions! But in order to avoid total chaos, we have a few guidelines.

If you found a bug, have questions or feature requests, don't hesitate to open an issue.

If you're working on an issue, please comment on it so we can assign you to it.

If you have code to submit, follow the general pull request format. Fork the repo, make your changes, and submit a pull request.

License

Copyright 2015 Martin Spier. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

CLI tool to convert perf record stacks to JSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published