-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Incremental stats clearing #42
Comments
Thanks for the explanation. We have also discussed this before on fastapi/fastapi#701 and |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: