Skip to content

Localized profiling #713

Open
Open
@alexandernst

Description

@alexandernst

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)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions