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

trio async timings should include child tasks #8

Open
belm0 opened this issue Jul 19, 2022 · 0 comments · May be fixed by #9
Open

trio async timings should include child tasks #8

belm0 opened this issue Jul 19, 2022 · 0 comments · May be fixed by #9

Comments

@belm0
Copy link
Owner

belm0 commented Jul 19, 2022

For perf-timer async support (Trio), I implemented the smallest possible thing: within a task, measure time excluding periods where the task is de-scheduled (sleeping, blocked on i/o or an event, etc.)

However, there is a strong use case for including the time spent in descendant tasks of the instrumented task (spawned by a nursery). This aggregate time would directly correlate to CPU usage. For example, if you measured the duration of async function foo() including child tasks as 5 s, while the total application runtime was 100 s, that means foo() was responsible for 5% of the CPU use.

@belm0 belm0 linked a pull request Aug 17, 2022 that will close this issue
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 a pull request may close this issue.

1 participant