mirror of
https://github.com/ruby/ruby.git
synced 2026-10-29 00:46:26 +08:00
Likewise for method coverage: walking me_set and cme2counter and hashing
the array keys on every peek dominated the cost. Maintain
{ path => { key => me or [me, ...] } } incrementally (both hashes are
append-only) and fill in the counts from cme2counter on each peek.
Extract rb_coverage_method_data_of() from thread.c for that.
10k methods: 24 ms -> 0.7 ms per peek. rack's test suite with SimpleCov
per-test tracking (lines+branches+methods): 30 s -> 8.4 s.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>