Skip to content

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

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

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

Conversation

@cphoward
Copy link

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
    """

    ...

    return idle, active, utilization

@cphoward cphoward marked this pull request as draft October 16, 2023 18:00
@cphoward cphoward force-pushed the cph/event-loop-utilization branch 3 times, most recently from fbbdf59 to 1f77a91 Compare October 16, 2023 20:56
@cphoward cphoward marked this pull request as ready for review October 16, 2023 20:57
@cphoward cphoward force-pushed the cph/event-loop-utilization branch from 1f77a91 to e49e540 Compare October 16, 2023 21:01
@cphoward cphoward force-pushed the cph/event-loop-utilization branch from e49e540 to f29f595 Compare October 16, 2023 21:08
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 this pull request may close these issues.

1 participant