benfred / py-spy

Sampling profiler for Python programs
MIT License
12.53k stars 414 forks source link

Infer format from output filename extension #445

Open gjoseph92 opened 3 years ago

gjoseph92 commented 3 years ago

The converse of https://github.com/benfred/py-spy/issues/229: I prefer speedscope format, so it would be nice to just be able to type py-spy record -o profile.json and not also have to add -f speedscope. Or to not get accidentally get an SVG flamegraph named profile.json :)