jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.59k stars 246 forks source link

Does speedscope-format JSON have a particular extension? #392

Closed joerick closed 2 years ago

joerick commented 2 years ago

Hello! Quick question - I'm implementing a feature in pyinstrument to automatically select the profiler output format based on the output file extension. We already have a json output that's specific to pyinstrument, so I was wondering if the speedscope format used (by convention) anything more specific to your format? Otherwise, I might just go with .speedscope.json.

jlfwong commented 2 years ago

Hi @joerick!

Yes! .speedscope.json is the expected extension. Using this extension will make files import very slightly faster due to this code: https://github.com/jlfwong/speedscope/blob/e37f6fa7c38c110205e22081560b99cb89ce885e/src/import/index.ts#L111-L113

joerick commented 2 years ago

Thank you for the quick response! 🙏