Repository navigation
Load the RSS measurement code prior to the first benchmark iteration - #577
Merged
Merged
Conversation
XrXr
reviewed
Nov 11, 2026
Member
There was a problem hiding this comment.
Nice catch.
If it has to be be in use_gemfile, fine, but is it possible to simplify the loading processing by lifting the
@fn = begin
load_fiddle
Fiddle::Function.new(
Fiddle.dlopen(nil)['proc_pid_rusage'],
[Fiddle::TYPE_INT, Fiddle::TYPE_INT, Fiddle::TYPE_VOIDP],
Fiddle::TYPE_INT,
)
rescue LoadError, Fiddle::DLError, NameError
nil
endout into module ProcPidUsage scope? (Or call it if macos.) Generally memoization is not a great pattern for stability.
Contributor
|
+1 just eager load it who cares |
Contributor
|
lgtm |
nirvdrum
force-pushed
the
eager-load-rss-sampler
branch
from
November 11, 2026 23:18
0aadf44 to
3aeaf36
Compare
On macOS, RSS is measured via Fiddle and loading it the way ruby-bench does (force-activation) via Bundler, loads code that redefines methods like `==` and `hash`, leading to cache invalidation that adversely affects benchmark runs.
nirvdrum
force-pushed
the
eager-load-rss-sampler
branch
from
November 11, 2026 23:36
3aeaf36 to
34d4d22
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On macOS, RSS is measured via Fiddle and loading it the way ruby-bench does (force-activation) via Bundler, loads code that redefines methods like
==andhash, leading to cache invalidation that adversely affects benchmark runs.