Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native support for cProfile dump #477

Open
arunoruto opened this issue May 20, 2024 · 2 comments
Open

Native support for cProfile dump #477

arunoruto opened this issue May 20, 2024 · 2 comments

Comments

@arunoruto
Copy link

I want to analyze some code and I do really love your project! The only problem ist, cProfile is the only tool that gives me reasonable outputs, without crashing. Sadly, speedscope does not support their profile dumps.

Is there a way to make them readable? I was able to use flameprof to generate an SVG, but that's it, it can't be interacted with or zoomed in.

If there is not alternative, maybe I will try to implement a translator from cProfile dump files to speedscope json files, but I am booked out until end of june.

@jlfwong
Copy link
Owner

jlfwong commented May 30, 2024

Hi @arunoruto!

I'd accept a patch to import them directly. I suspect you can already import them if you just use the output of flameprof --format=log requests.prof. I'm guessing this outputs in the format that flamegraph.pl accepts, which speedscope already supports as an input format.

Let me know if that works!

@arunoruto
Copy link
Author

Sorry for the late follow up!
I tried your suggestion and it worked out pretty well! I am finally able to convert my cProfile dumps to something readable by speedscope 😁

It would be cool to have that integrated inside of speedscope, but for now I am also satisfied with this solution! Maybe I will look into converting the files in my script before dumping them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants