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
Possible partial solution: Decorators which use functools.wraps annotate the function object with wrapped property which points to the wrapped target. Recursively checking for the wrapper and replacing the function in each case correctly profiles the target function. See mock https://github.com/stenbein/memory_profiler/tree/stacked-decorators
Stacking multiple decorators together will result in unexpected behavior. A trivial example:
What I expect to see:
What we actually get:
I realized while checking this that the sample timeit decorator has the same issue and is timing the
@profile
rather than the underlyingto_profile
.The text was updated successfully, but these errors were encountered: