Skip to content

Show GC results for every ruby when comparing builds - #541

Open
eightbitraptor wants to merge 1 commit into
mainfrom
mvh-gc-benchmark-fix
Open

eightbitraptor wants to merge 1 commit into
mainfrom
mvh-gc-benchmark-fix

Conversation

@eightbitraptor

Copy link
Copy Markdown
Member

With three or more rubies, the GC summary only had one row per comparison so no ruby had its own row and the baseline appeared only on the left of each arrow. This got a little confusing because there was no way of directly comparing the numbers for each run other than the ratios of each measure compared to the "base" Ruby, ie. the first one passed to the run_benchmark script.

This PR introduces a new "GC per ruby" table before the GC summary. It has one row per ruby per benchmark, with the same absolute columns as the single-ruby table. The table is left out when only one ruby runs, because the single-ruby report already shows those values.

This will make it easier to directly compare raw GC numbers between multiple rubies, especially when you're testing against 3+ Ruby versions.

With three or more rubies, the GC summary only had one row per
comparison (base → other), so no ruby had its own row and the
baseline appeared only on the left of each arrow. A new "GC per ruby"
table now prints before the GC summary. It has one row per ruby per
benchmark, with the same absolute columns as the single-ruby table.
The table is left out when only one ruby runs, because the
single-ruby report already shows those values. A benchmark is left
out only when no ruby has GC activity.

The legend and GC metric notes now say which table each sentence
describes, and they describe each table's own skip rule. The Ractor
GC ms/worker note now appears whenever a table shows that column.

harness-gc also printed 0 live and free slots in the heap utilisation
table on Ruby 3.4, because GC.stat_heap before 4.0 has no
heap_live_slots or heap_free_slots. After the full GC, the harness now
derives them from the per-heap total_allocated_objects and
total_freed_objects counters.
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