Skip to content
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

Don't toggle profiler state when calling a profiled function recursively #6834

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

elprans
Copy link
Member

@elprans elprans commented Feb 13, 2024

In

@profile
def foo():
   if condition:
       foo()

make sure we don't call profiler.enable() or profiler.disable() on
recursive invocation of foo.

In

    @Profile
    def foo():
       if condition:
           foo()

make sure we don't call `profiler.enable()` or `profiler.disable()` on
recursive invocation of `foo`.
@elprans elprans requested review from msullivan and fantix February 13, 2024 18:51
@elprans elprans merged commit 619f13f into master Feb 13, 2024
23 checks passed
@elprans elprans deleted the profiler branch February 13, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants