Joe Rickerby

Results 376 comments of Joe Rickerby

Hi @patroqueeet, how are you invoking pyinstrument?

Not sure what's going on here tbh... my tests in Docker seem to work just as normal. Are you able to make a minimal recreation?

Thanks for taking another look! If the problem occurs in cProfile too, it's probably at a lower level than we can fix. A wild guess at the cause would have...

I had a thought on this - pyinstrument_cext could add a feature where, rather than calling gettimeofday on every trace event, it checks an internal variable that's being incremented by...

Cool idea. Could perhaps be possible by using https://github.com/lmacken/pyrasite?

true. I didn't actually manage to get pyrasite working on my mac just now. how are you imagining this working then? there's a dormant bit of pyinstrument that's already loaded...

Yes, I think this is a good idea! I'm a little wary of using signals for this, it's _probably_ okay, and they'll get us the ability to drop a callback...

Would main-thread-only be a deal-breaker for your use case?

yeah..... it's a pain for that use case. I'm wondering if we could use [threading.setprofile](https://docs.python.org/3/library/threading.html#threading.setprofile) to cover that off? But that would require the profiling to be always active, even...

I've been looking around at other profilers, there's one called 'yappi' that can do this - it can make itself the profiler for all active threads, by editing a couple...