Joe Rickerby

Results 376 comments of Joe Rickerby

Happy to review a PR on this, if you want to have a crack at it! Though it might require modifications to the C extension, i don't know if you'd...

Hi @erez-marmor, thanks for filing this will full repro details, I was able to reproduce the error locally. Your middleware isn't correct, because of how starlette/fastapi uses threads. The profiler...

> ideally, I would expect the profiler instance to be created only once instead of per request (right now it's not a problem since the profiler object is lightweight, but...

> IMO it would be better to add a flag controlling whether or not to raise an exception (raise by default) - most naive users won't notice a runtime warning...

Yes, it is :) but keeping the same profiler between requests is going to aggregate those timings together. Although, maybe you wanted that?

Yes, Session.combine() should be able to handle the combination. As for the multiple root frames, it feels like we could probably refactor to remove this limitation now. The simplest way...

Yes, this is not too surprising, as pyinstrument is recording frame samples as the program executes. If you need to reduce the memory consumption, for a long-running job, you might...

Yeah, I can see the benefit to this. `pyinstrument --list-recent` or something. I'd be happy to review a PR if you have time.

Yes, this would be really nice. It's not something that is naturally available via the [native Python `frame` interface](https://docs.python.org/3/library/inspect.html) but I think it's possible to 'guess' by looking at the...

Hi @asmeurer ! I'm not sure how we'd incorporate visually into the output, but it should be easy enough to write a renderer to do it - the Frame objects...