stack-convert
v0.3.2
Published
CLI tool to convert perf record data to JSON.
Downloads
4
Readme
stack-convert
stackconvert is a CLI tool to convert perf record 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.data > perf.json
Where:
perf.data is the output file from perf record 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 record 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.