Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add async awareness to Tachyon profiler #141565

Copy link
Copy link
@savannahostrowski

Description

@savannahostrowski
Issue body actions

Feature or enhancement

Currently, Tachyon has no awareness of the async call stack, so flamegraphs for async code don't show the logical task hierarchy and are not very useful to users. The profiler should reconstruct async task dependencies and display them in the flamegraph to make async code profiling actionable.

Current state for a basic async program:

Image

...and asyncio's pstree for the same program:

└── (T) Task-1
    └──  main /Users/savannah/code/cpython/sandbox/test_simple_async.py:59
        └──  wait_for /Users/savannah/code/cpython/Lib/asyncio/tasks.py:488
            └── (T) Supervisor
                └──  supervisor /Users/savannah/code/cpython/sandbox/test_simple_async.py:41
                    ├── (T) Worker-0
                    │   └──  worker /Users/savannah/code/cpython/sandbox/test_simple_async.py:24
                    │       └── (T) LeafTask-0
                    │           └──  leaf_work /Users/savannah/code/cpython/sandbox/test_simple_async.py:13
                    │               └──  sleep /Users/savannah/code/cpython/Lib/asyncio/tasks.py:702
                    ├── (T) Worker-1
                    │   └──  worker /Users/savannah/code/cpython/sandbox/test_simple_async.py:24
                    │       └── (T) LeafTask-1
                    │           └──  leaf_work /Users/savannah/code/cpython/sandbox/test_simple_async.py:13
                    │               └──  sleep /Users/savannah/code/cpython/Lib/asyncio/tasks.py:702
                    └── (T) Worker-2
                        └──  worker /Users/savannah/code/cpython/sandbox/test_simple_async.py:24
                            └── (T) LeafTask-2
                                └──  leaf_work /Users/savannah/code/cpython/sandbox/test_simple_async.py:13
                                    └──  sleep /Users/savannah/code/cpython/Lib/asyncio/tasks.py:702```

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Labels

stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-profilingtype-featureA feature request or enhancementA feature request or enhancement
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.