[HN Gopher] Memray: Python memory profiler ___________________________________________________________________ Memray: Python memory profiler Author : bx376 Score : 119 points Date : 2023-12-07 20:53 UTC (1 days ago) (HTM) web link (bloomberg.github.io) (TXT) w3m dump (bloomberg.github.io) | martinky24 wrote: | Memray is incredibly usable. In a few projects I was able to go | from 0 to identifying my "problem children" in less than 15 | minutes. | | I don't use it often, but when I need to I'm glad it's a part of | my toolbox! | Agingcoder wrote: | Interesting feedback. I've found memory profiling in python to | be vastly annoying, and tooling less than adequate. I'll give | it a try. | ph4evers wrote: | This is great! I managed to spot some inefficienties in my ML | inference pipeline by generating some flame graphs using Memray. | dang wrote: | Related: | | _Memray: a memory profiler for Python_ - | https://news.ycombinator.com/item?id=31102089 - April 2022 (48 | comments) | emmanueloga_ wrote: | Does anyone know how it compares to scalene? | | https://github.com/plasma-umass/scalene | ipsum2 wrote: | The main difference is Scalene is a sampling profiler, and | Memray appears to be an instrumentation profiler. | Instrumentation profilers usually give more precise information | at the cost of a slowdown. | | From Memray: | | > Traces every function call so it can accurately represent the | call stack, unlike sampling profilers. | bovermyer wrote: | Now if only there was one of these for Node.js... | mike_hock wrote: | All my memrays gather 'round her. | | Miner's layday, stranger to blue water. | LarsDu88 wrote: | memray is awesome. Used it to demonstrate massive memory savings | wins for presentations | | My favorite feature is the jupyter integration. Just decorate a | cell with %%memray_flamegraph | | I'd really like a version of this to spit out a csv or something | for going straight into making plots | bastih wrote: | I have a lot of praise for using Memray as part of working out | some memory kinks in a codebase I'm working on. It allowed me to | quickly iterate on some hunches and then enshrine the resulting | memory savings in tests via pytest-memray. | harikb wrote: | bloomberg! they seem to be sponsoring a bunch of good work for | OSS. Thank you!! I also happen to meet some of their engineers at | Gophercon this year. Wouldn't have thought they do so much! | Thanks! | malkia wrote: | Is this working on Windows? | shikon7 wrote: | Does it also work with CUDA memory? ___________________________________________________________________ (page generated 2023-12-08 23:00 UTC)