Skip to content

feat(uvloop): Support event loop utilization queries - #579

Open
cphoward wants to merge 1 commit into
MagicStack:masterfrom
cphoward:cph/event-loop-utilization
Open

feat(uvloop): Support event loop utilization queries#579
cphoward wants to merge 1 commit into
MagicStack:masterfrom
cphoward:cph/event-loop-utilization

Conversation

@cphoward

Copy link
Copy Markdown

This change seeks to expose libuv's internal uv_metrics_idle_time to permit users to tune their applications. This change is inspired by Nodejs' internalEventLoopUtilization.

The heart of this change is:

def_event_loop_utilization(self):
"""Returns idle and active time in milliseconds and the percentage of time the event loop is active """
...
returnidle, active, utilization

@cphoward
cphoward marked this pull request as draft October 16, 2023 18:00
@cphoward
cphowardforce-pushed the cph/event-loop-utilization branch 3 times, most recently from fbbdf59 to 1f77a91CompareOctober 16, 2023 20:56
@cphoward
cphoward marked this pull request as ready for review October 16, 2023 20:57
@cphoward
cphowardforce-pushed the cph/event-loop-utilization branch from 1f77a91 to e49e540CompareOctober 16, 2023 21:01
@cphoward
cphowardforce-pushed the cph/event-loop-utilization branch from e49e540 to f29f595CompareOctober 16, 2023 21:08
@ericbuehl

Copy link
Copy Markdown

I could see this being immensely useful in support of #322

@1st1@fantix what do we think here?

Sign up for freeto 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

@cphoward@ericbuehl