Skip to content

Fix wrong variable in eventloop events max metric - #13488

Merged
moonchen merged 1 commit into
apache:masterfrom
moonchen:fix-eventloop-events-max
Aug 4, 2026
Merged

Fix wrong variable in eventloop events max metric#13488
moonchen merged 1 commit into
apache:masterfrom
moonchen:fix-eventloop-events-max

Conversation

@moonchen

@moonchen moonchen commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

The code for counting eventloop events max used the incorrect _count variable, which stores the number of iterations, rather than the number of events. proxy.process.eventloop.events.max.* has therefore been reporting an iteration count. Fix it by changing the code to use count.

Slice::record_event_count() assigned the loop-execution count instead of
the event count, so proxy.process.eventloop.events.max.* has always
reported how many loops ran rather than the largest number of events
dispatched in a single loop.
Copilot AI lite review requested due to automatic review settings August 4, 2026 16:53
@moonchen moonchen self-assigned this Aug 4, 2026
@moonchen moonchen added Event System Backport Marked for backport for an LTS patch release labels Aug 4, 2026
@moonchen moonchen added this to the 11.0.0 milestone Aug 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Fixes the eventloop “events max” metric to reflect the number of events processed (not iteration count), correcting proxy.process.eventloop.events.max.* reporting.

Changes:

  • Update record_event_count to store _events._max from the count argument instead of _count.

@JosiahWI JosiahWI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! Good catch!

@moonchen
moonchen merged commit a2ff4ae into apache:master Aug 4, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this to For v10.2.0 in ATS v10.2.x Aug 4, 2026
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Aug 5, 2026
Slice::record_event_count() assigned the loop-execution count instead of
the event count, so proxy.process.eventloop.events.max.* has always
reported how many loops ran rather than the largest number of events
dispatched in a single loop.

(cherry picked from commit a2ff4ae)
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Aug 5, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Aug 5, 2026
@cmcfarlen

Copy link
Copy Markdown
Contributor

Cherry-picked to the 10.2.x branch as 0f07a58 for the 10.2.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport Marked for backport for an LTS patch release Bug Event System Metrics

Projects

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

4 participants