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

Bump io-event from 1.8.4 to 1.9.0 #84

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 11, 2025

Bumps io-event from 1.8.4 to 1.9.0.

Changelog

Sourced from io-event's changelog.

v1.9.0

Improved IO::Event::Profiler for detecting stalls.

A new IO::Event::Profiler class has been added to help detect stalls in the event loop. The previous approach was insufficient to detect all possible stalls. This new approach uses the RUBY_EVENT_FIBER_SWITCH event to track context switching by the scheduler, and can detect stalls no matter how they occur.

profiler = IO::Event::Profiler.new
profiler.start
Fiber.new do
sleep 1.0
end.transfer
profiler.stop

A default profiler is exposed using IO::Event::Profiler.default which is controlled by the following environment variables:

  • IO_EVENT_PROFILER=true - Enable the profiler, otherwise IO::Event::Profiler.default will return nil.
  • IO_EVENT_PROFILER_LOG_THRESHOLD - Specify the threshold in seconds for logging a stall. Defaults to 0.01.
  • IO_EVENT_PROFILER_TRACK_CALLS - Track the method call for each event, in order to log specifically which method is causing the stall. Defaults to true.

The previous environment variables IO_EVENT_SELECTOR_STALL_LOG_THRESHOLD and IO_EVENT_SELECTOR_STALL_LOG no longer have any effect.

v1.8.0

Detecting fibers that are stalling the event loop.

A new (experimental) feature for detecting fiber stalls has been added. This feature is disabled by default and can be enabled by setting the IO_EVENT_SELECTOR_STALL_LOG_THRESHOLD to true or a floating point number representing the threshold in seconds.

When enabled, the event loop will measure and profile user code when resuming a fiber. If the fiber takes too long to return back to the event loop, the event loop will log a warning message with a profile of the fiber's execution.

> cat test.rb 
#!/usr/bin/env ruby

require_relative "lib/async"

Async do
Fiber.blocking do
sleep 1
end
end

> IO_EVENT_SELECTOR_STALL_LOG_THRESHOLD=true bundle exec ./test.rb
Fiber stalled for 1.003 seconds
/home/samuel/Developer/socketry/async/test.rb:6 in '#<Class:Fiber>#blocking' (1s)
/home/samuel/Developer/socketry/async/test.rb:7 in 'Kernel#sleep' (1s)

... (truncated)

Commits
  • 6dd1f97 Bump minor version.
  • 3d52925 Fix test.
  • 358300a Modernize code, add Ruby 3.4 to CI.
  • e97accf Add default implementation of IO::Event::Profiler.default.
  • 83be882 Tidy up implementation of profiler + release notes.
  • c00e50b Add shim for profiler.
  • 40fca94 Fix: warning: old-style function definition.
  • a9dc943 RuboCop.
  • ee8669a Make sure profiler->current is initialized correctly.
  • 396ca5f Add config/environment.rb for ext setup.
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [io-event](https://github.com/socketry/io-event) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/socketry/io-event/releases)
- [Changelog](https://github.com/socketry/io-event/blob/main/releases.md)
- [Commits](socketry/io-event@v1.8.4...v1.9.0)

---
updated-dependencies:
- dependency-name: io-event
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Feb 11, 2025
@ledermann-bot ledermann-bot merged commit fa65b81 into main Feb 11, 2025
2 checks passed
@dependabot dependabot bot deleted the dependabot/bundler/io-event-1.9.0 branch February 11, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant