jlfwong / speedscope

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

Loading profile from `austin>=3.0.0` fails #369

Open siboehm opened 2 years ago

siboehm commented 2 years ago

To reproduce:

  1. conda install austin==3.1
  2. austin -o outfile.txt python -c "import this"
  3. Upload outfile.txt to Speedscope: "Unrecognized format! See documentation about supported formats."

The issue can be "fixed" by using austin<3.0, or by using the austin>=3.0 combined with austin2speedscope conversion tool. According to @P403n1x87 since https://github.com/jlfwong/speedscope/pull/336/files was merged the new output format of austin>=3.0 should be supported. Is this a bug or expected behaviour? Using austin=2.1.1 with speedscope was always a very seamless experience.

Austin issue for reference: https://github.com/P403n1x87/austin/issues/91

jlfwong commented 2 years ago

Hi @siboehm, thanks for the report

Ah, I think I may not have deployed/published since that was merged.

If you clone the repo and then run npm install && npm run serve and load the file in the resulting browser tab, does that work?

siboehm commented 2 years ago

Sorry, I should've tried that first. It loads without errors if I serve from main. However there is a new issue:

Again I ran austin -o austin_<version>.txt python -c 'import this'. austin_2_1_1.txt austin_3_1.txt

Output for austin==3.1: Screenshot 2021-10-22 at 06-43-16 austin_3_1 txt - speedscope

Output for austin=2.1.1: Screenshot 2021-10-22 at 06-43-46 austin_2_1 txt - speedscope

austin_3_1.txt last few lines:

P132713;T132713 156
P132713;T132713 156
P132713;T132713 154
P132713;T94566012038032;/home/simon/miniconda3/lib/python3.8/this.py:<module>:28 154

# duration: 32825
P403n1x87 commented 2 years ago

However there is a new issue:

One of the breaking changes between Austin 2 and 3 is the output format, which has been made easier for a machine to parse. Furthermore, the behaviour of the -a option has been switched around, as documented in the changelog. So this is not an issue with Speedscope (but might become a feature request to support the new Austin format).

However, if the "new issue" is the presence of the # duration frame, that could have an easy solution 🙂 .

siboehm commented 2 years ago

Oh sorry I should've clarified: The "new issues" was referring to the # duration block that appears at the end. I'm glad the output of -a has switched, this way it's much more readable by default.

P403n1x87 commented 2 years ago

I have created #371 to address this new issue.