feat: add consumeDelaySeconds for time-based consumer delay#458
Open
coderzc wants to merge 1 commit intoopenmessaging:masterfrom
Open
feat: add consumeDelaySeconds for time-based consumer delay#458coderzc wants to merge 1 commit intoopenmessaging:masterfrom
coderzc wants to merge 1 commit intoopenmessaging:masterfrom
Conversation
Introduces a workload-level consumeDelaySeconds option. When set, after warmup the framework pauses all consumers for the configured number of seconds and then automatically resumes them before the measurement window starts. This enables tiered-storage style scenarios where backlog must accumulate and be offloaded before consumers begin draining, without requiring an external coordinator.
c7f344e to
35dd2ea
Compare
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.
Summary
consumeDelaySecondsfield toWorkload. When > 0, the framework automatically pauses all consumers immediately after warmup, sleeps for the configured number of seconds, then resumes consumers before the measurement window begins.Motivation
consumerBacklogSizeGBbuilds backlog by size, but for tiered-storage benchmarks we need a time-based gap so the broker has a deterministic window to flush ledgers and offload them. A simple time-based delay that the framework owns end-to-end is the cleanest expression of that.Behavior
0⇒ no behavior change for existing workloads.> 0, afterwarmupDurationMinutesandworker.resetStats(),worker.pauseConsumers()is called, the thread sleeps forconsumeDelaySeconds, thenworker.resumeConsumers()is called before the measurement loop starts.consumerBacklogSizeGB; if both are set the existing backlog logic still runs and the consume-delay window happens before the measurement loop.Test plan
mvn -pl benchmark-framework -am clean compilepasses (verified locally).consumeDelaySecondsare unaffected.consumeDelaySeconds: 60pauses consumers for 60s after warmup, then resumes.