Skip to content

Conversation

@rwstauner
Copy link
Contributor

@rwstauner rwstauner commented Jul 16, 2024

  • Embed realtime method to remove dependency on benchmark
  • Warn and skip max rss if fiddle fails to load
  • Warn and skip writing file if json fails to load

Makes the output differ thusly:

$ WARMUP_ITRS=1 MIN_BENCH_ITRS=2 MIN_BENCH_TIME=0 ruby ~shopify/yjit-bench/benchmarks/protoboeuf-encode/benchmark.rb
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
itr #1: 102ms
itr #2: 98ms
itr #3: 98ms
RSS: 51.3MiB
MAXRSS: 52912.0MiB
Writing file /Users/rwstauner/src/github.com/ruby/ruby/data/results-ruby-3.3.0-2024-07-16-132905.json
Average of last 2, non-warmup iters: 98ms

$ WARMUP_ITRS=1 MIN_BENCH_ITRS=2 MIN_BENCH_TIME=0 ./miniruby -r./rbconfig ~shopify/yjit-bench/benchmarks/protoboeuf-encode/benchmark.rb
ruby 3.4.0dev (2024-07-16T19:50:00Z master c083a3ffcd) [arm64-darwin23]
itr #1: 96ms
itr #2: 91ms
itr #3: 91ms
RSS: 54.2MiB
Failed to get max RSS: cannot load such file -- fiddle
Failed to write JSON file: cannot load such file -- json
Average of last 2, non-warmup iters: 91ms

@rwstauner rwstauner requested review from k0kubun and tenderworks July 16, 2024 20:46
@maximecb maximecb merged commit dfe53c5 into main Jul 16, 2024
@maximecb maximecb deleted the rwstauner/miniruby branch July 16, 2024 21:52
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.

4 participants