TriggerRunner: Add batch trigger creation duration metric#68521
Open
SameerMesiah97 wants to merge 1 commit into
Open
TriggerRunner: Add batch trigger creation duration metric#68521SameerMesiah97 wants to merge 1 commit into
SameerMesiah97 wants to merge 1 commit into
Conversation
Add a timing metric that records the time spent creating all pending triggers during a single create_triggers() invocation. Also add a unit test verifying that the metric is emitted when triggers are successfully created.
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.
Description
This change adds a
batch_trigger_creation_durationtiming metric to measure the total time spent creating pending triggers during a single invocation ofTriggerRunner.create_triggers().The metric is emitted only when trigger creation work is performed.
Rationale
Trigger creation occurs on the triggerer event loop. During periods of high trigger creation volume, processing large batches of pending triggers may occupy the event loop for extended periods, but this time is not currently observable.
This metric provides visibility into the cost of trigger creation and helps identify situations where large creation batches contribute to triggerer latency.
Tests
Added a unit test verifying that the
batch_trigger_creation_durationmetric is emitted when pending triggers are successfully created.Backwards Compatibility
This change is additive only and does not modify trigger execution behavior, lifecycle semantics, or public APIs.