flask-profiler icon indicating copy to clipboard operation
flask-profiler copied to clipboard

Feature for granular profiling

Open divyenduz opened this issue 8 years ago • 1 comments
trafficstars

While using flask-profiler in production (via https://github.com/muatik/flask-profiler#sampling)

I noticed that I miss a feature, while I am able to detect the slower endpoints, I had to go manually to profile the slower end points line by line, which involved going through multiple function calls.

How about integrating something like https://github.com/rkern/line_profiler into flask-profiler itself.

Just throwing an idea here for discussion, in my opinion there are two ways to go about implementing this, one way would be to make this a core feature in flask-profiler and let this be enabled via config, find a way to show this on UI.

Another way would be to not make this as a feature but allowing saving extra data with each request (by fixing a key). So, whenever someone will need to profile code line by line he will import this as a dependency and piggyback the data to flask-profiler manually. This way can also help us solve https://github.com/muatik/flask-profiler/issues/42

Thinking in terms of simplicity vs feature, I think if done after a lot of thought we can still manage to keep the code simple enough and add this granular profiling feature there by making flask-profiler even more helpful.

What is your opinion on all of this ?

Thanks

divyenduz avatar Nov 30 '16 05:11 divyenduz

I think this is a duplicate of https://github.com/muatik/flask-profiler/issues/39

divyenduz avatar Apr 29 '17 14:04 divyenduz