You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yappi is currently poorly suited to long-running applications, since the only way to free a set of profiling stats once they're no longer needed is to clear the all of the profiler's memory, effectively resetting it. In a multi-threaded or async system, this is almost certain to interfere with the other threads, and even if losing profiler data isn't critical, it could lead to some frustration when attempting to isolate some of the longer code paths applications that are meant to run for extended periods of time (such as any kind of server).
There should be an alternative to clear_stats() that allows the user to pass the same kind of filter passed to get_func_stats() to cleanup select parts of the profiler stats. Alternatively, this could be implementad as a method to YFuncStat, which would free all memory related to the function calls contained within.
The text was updated successfully, but these errors were encountered:
We have also discussed this before on fastapi/fastapi#701 and clear_stats() filtering might be worth implementing for using in long running servers/middleware as you proposed.
Yappi is currently poorly suited to long-running applications, since the only way to free a set of profiling stats once they're no longer needed is to clear the all of the profiler's memory, effectively resetting it. In a multi-threaded or async system, this is almost certain to interfere with the other threads, and even if losing profiler data isn't critical, it could lead to some frustration when attempting to isolate some of the longer code paths applications that are meant to run for extended periods of time (such as any kind of server).
There should be an alternative to
clear_stats()
that allows the user to pass the same kind of filter passed toget_func_stats()
to cleanup select parts of the profiler stats. Alternatively, this could be implementad as a method toYFuncStat
, which would free all memory related to the function calls contained within.The text was updated successfully, but these errors were encountered: