Hacker GitHub

← All repos

benfred/py-spy

View on GitHub ↗ ★ 15,624 Rust

Sampling profiler for Python programs

26 mentions on Hacker News by 19 people: 2 stories, 24 comments · first 2018-09-06 · latest 2025-03-07

Mentions per year 26 mentions · busiest year 2020 (7)
20082026
  1. …profilers for non-native languages (e.g. python). Does this mean that they use something similar to https://github.com/benfred/py-spy ? Otherwise, it's not obvious to me how they can read python state. Lastly, the github repo…
  2. …to cProfile/profile. You might also want to look at: 1] https://github.com/joerick/pyinstrument 2] https://github.com/benfred/py-spy 3] https://github.com/P403n1x87/austin 4] https://github.com/bloomberg/memray 5]…
  3. …readable by the Firefox Profiler tool. [1] : https://github.com/joerick/pyinstrument [2] : https://github.com/benfred/py-spy
    comment by scottwick · 2023-07-05 · in FunctionTrace: Graphical Python Profiler
  4. https://github.com/benfred/py-spy is also really nice, and has an actual oss license.
    comment by kapilvt · 2023-07-05 · in FunctionTrace: Graphical Python Profiler
  5. For CPU cycles, py-spy[0] is getting more and more used. For RAM, I would like to known too... [0] -- https://github.com/benfred/py-spy
  6. …a profiling tool that can generate flame charts containing a mix of python and C (or C++) calls. https://github.com/benfred/py-spy It's worked really well for my needs
  7. Any advantages/disadvantages compared to py-spy [1]? [1]: https://github.com/benfred/py-spy
  8. …Chrome can render but it does produce great interactive SVGs and is compatible with speedscope.app https://github.com/benfred/py-spy https://github.com/jlfwong/speedscope
  9. It is pretty cool. py-spy has also been doing this for a few years https://github.com/benfred/py-spy
  10. …about leaving your program suspended - I believe that was because of a bug that should be fixed now https://github.com/benfred/py-spy/issues/390 =(
  11. …these HPC tools to the spreadsheet. FYI I'd consider py-spy for profiling Python+C extensions: https://github.com/benfred/py-spy#can-py-spy-profile-native-...
  12. …taking a sample. Py-spy defaults to blocking because the results can be pretty wrong otherwise: https://github.com/benfred/py-spy/issues/56 . You can see this problem profiling a program like https://github.com/benfred/py-spy/blob/master/te…
  13. Two other profilers that also let you spy on a running Python program: - py-spy: https://github.com/benfred/py-spy (written in Rust) - pyflame: https://github.com/uber-archive/pyflame (C++, seems to be not maintained anymore) The "no…
  14. …saving down an svg file and opening up the browser a bit arduous. Excited to give it a try. [1] https://github.com/benfred/py-spy [2] https://jvns.ca/blog/2018/09/08/an-awesome-new-python-profil...
  15. ….com/rwth-i6/returnn/blob/5b8e34ec1fd725d0e20b... Profiling is another topic. Something like Py-Spy ( https://github.com/benfred/py-spy ) can be very helpful. I also found a remote background ZMQ IPython/Jupyter kernel to be useful…
    comment by albertzeyer · 2020-06-02 · in Guide to Python Debugging
  16. …doesn’t work with threads, and significantly slows your program down. I wrote a tool py-spy ( https://github.com/benfred/py-spy ) that is worth checking out if you’re interesting in profiling python programs. Not only does it solve those…
    comment by benfrederickson · 2020-01-14 · in Making Python Programs Blazingly Fast
  17. Similar to PyFlame is also py-spy: https://github.com/benfred/py-spy > While pyflame is a great project, it doesn't support Python 3.7 yet and doesn't work on OSX, Windows or FreeBSD. I wonder how the CPU profiling in Scalene is different.…
  18. ▲ 2
    Sampling Profiler for Python Programs
    story by gilad · 2020-01-05 · 0 comments
  19. …`py-spy` for debugging perf issues. Flamegraphs are much nicer to work with than cProfile's output. https://github.com/benfred/py-spy
    comment by emptysea · 2019-12-03 · in BPF: A New Type of Software
  20. woah I hadn't seen that.. sounds like PySpy but implemented in BPF. That's crazy and cool: https://github.com/benfred/py-spy
    comment by lathiat · 2019-10-11 · in BPF at Facebook and beyond
  21. I wrote something that will get you the python interpreter stack from any running cpython process : https://github.com/benfred/py-spy/ , and rbspy can do the same for ruby https://github.com/rbspy/rbspy
    comment by benfrederickson · 2018-10-15 · in Using /proc to get a process' current stack trace
  22. …to look for ways to improve your python code, check out https://github.com/uber/pyflame or https://github.com/benfred/py-spy
    comment by sciurus · 2018-09-27 · in Profiling CPython at Instagram (2017)
  23. https://github.com/benfred/py-spy#when-do-you-need-to-run-as... tl;dr - yes, it's a limitation(?) of macOS syscalls.
  24. …Both of your suggestions totally make sense. I've created an issue to track the poll() issue here https://github.com/benfred/py-spy/issues/13 - I think that should be an easy fix.
  25. …I'm hoping to have a version that supports this next week. Will update this issue when it's done: https://github.com/benfred/py-spy/issues/3
  26. ▲ 286
    Show HN: Py-spy – A new sampling profiler for Python programs
    story by benfrederickson · 2018-09-06 · 43 comments