Skip to content

Use live counts for event hook stats#9277

Merged
headius merged 1 commit intojruby:masterfrom
headius:event_hook_stats
Mar 1, 2026
Merged

Use live counts for event hook stats#9277
headius merged 1 commit intojruby:masterfrom
headius:event_hook_stats

Conversation

@headius
Copy link
Copy Markdown
Member

@headius headius commented Mar 1, 2026

In CRuby, the deleted count in the stats appears to indicate those hooks that have been slated for removal from the hook list but not yet actually removed. JRuby actively removes the hook immediately when requested, so this deleted count is not really accurate.

The added count is all the other hooks in the list that have not been slated for removal, and should be calculated live from that list.

Tracking these values separately is error prone and we did not really represent deleted the way it seems to be used in CRuby.

@headius headius added this to the JRuby 10.1.0.0 milestone Mar 1, 2026
@headius headius changed the title Don't track added and deleted separately Use live counts for event hook stats Mar 1, 2026
In CRuby, the deleted count in the stats appears to indicate those
hooks that have been slated for removal from the hook list but not
yet actually removed. JRuby actively removes the hook immediately
when requested, so this deleted count is not really accurate.

The added count is all the other hooks in the list that have not
been slated for removal, and should be calculated live from that
list.

Tracking these values separately is error prone and we did not
really represent deleted the way it seems to be used in CRuby.
@headius headius force-pushed the event_hook_stats branch from 4f8a7c9 to 05bf660 Compare March 1, 2026 20:59
@headius headius merged commit a9ce535 into jruby:master Mar 1, 2026
77 of 79 checks passed
@headius headius deleted the event_hook_stats branch March 1, 2026 21:43
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