Skip to content

Add benchmarks/gc_balloon.rb - #539

Open
luke-gruber wants to merge 1 commit into
ruby:mainfrom
luke-gruber:gc_balloon_standalone
Open

luke-gruber wants to merge 1 commit into
ruby:mainfrom
luke-gruber:gc_balloon_standalone

Conversation

@luke-gruber

Copy link
Copy Markdown
Collaborator

This is intended to be used with the ractor-harness with --ractor-gc to see per-iteration accumulation of ractor GC data.

This is intended to be used with the ractor-harness with --ractor-gc to
see per-iteration accumulation of ractor GC data.
@thomasklemm

Copy link
Copy Markdown
Contributor

Heads-up in case it's useful: gc_balloon fails on Ruby 4.0 and TruffleRuby with GC.start: unknown keyword: :global; only Ruby master accepts that keyword. Also, main renamed the harnesses after this branch was created (a1c61f6, bcee592), so on main default_harness: harness-gc and ../harness/loader now raise LoadError. The change below checks for the keyword the way harness/ractor.rb does. With it, gc_balloon runs with the gc and ractor harnesses on 4.0.9 and master, and on master with YJIT and ZJIT. Fork CI: https://github.com/thomasklemm/ruby-bench/actions/runs/42081299470

--- a/benchmarks.yml
-  default_harness: harness-gc
+  default_harness: gc
--- a/benchmarks/gc_balloon.rb
-require_relative '../harness/loader'
+require_relative '../lib/harness/loader'
@@
-  LOCAL_MAJOR_ONLY = true
+  LOCAL_MAJOR_ONLY = GC.method(:start).parameters.include?([:key, :global])

With #569 and #570, the gc harness on master also shows gc_balloon's marking time per minor and per major GC (about 9.2 ms and 1.6 ms here; the majors are the four GC.start(global: false) calls per iteration).

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.

3 participants