Closed yanns closed 10 months ago
I'm not sure I follow — does cargo install inferno
not work for you?
When I'm running perf on servers, where the application is running inside of a docker container, I cannot install anything. There's no cargo
.
But I can download a binary.
And I cannot run perf
locally because I'm on mac, and the production is running on linux.
Ah, so what you're asking for are pre-built binaries on the GitHub releases page? I think we could set up something like that without too much issue using https://github.com/axodotdev/cargo-dist — if you want to give it a shot, please do!
Not sure what you mean about that second part — inferno doesn't actually generate the traces for you, so it has nothing directly to do with perf
.
Ah true, I could run perf script
on the linux server, downloading the file, and using inferno-collapse-perf
locally. I'll give it a try.
I could create flamegraph by using perf
on the server:
$ perf record -p 1 --call-graph dwarf -o /tmp/$outputfilename.data -- sleep 10
$ perf script --no-inline -i /tmp/$outputfilename.data > /tmp/$outputfilename.script
then I can download $outputfilename.script
and generate a flamegraph from it with inferno:
inferno-collapse-perf target/$outputfilename.script > target/$outputfilename.folded
cat target/$outputfilename.folded | inferno-flamegraph > target/$outputfilename.svg
Thanks for the help! I don't need the packages on the server side anymore. I might still try with https://github.com/axodotdev/cargo-dist
When dealing with some servers, it'd be great to be able to download a released package to be able to run this script on the server: