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

Localized profiling #713

Open
alexandernst opened this issue Jun 4, 2024 · 0 comments
Open

Localized profiling #713

alexandernst opened this issue Jun 4, 2024 · 0 comments

Comments

@alexandernst
Copy link

Let's say I have the following code:

def my_view(request):
    a = do_a()

    with silk_profile("do_b":
        b = do_b()

    c = do_c()

Currenty I'm getting a profiler dump for the entire my_view (including all of django's middlewares, asgiref, etc...).
Is there a way to get a profiler dump only for the code that has been wrapped in the silk_profile context (do_b() in this case)?

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

No branches or pull requests

1 participant