Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make sample size reporting in metrics more congruent/deterministic #17

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

josephcopenhaver
Copy link
Owner

@josephcopenhaver josephcopenhaver commented Nov 29, 2023

with the enqueue intent/reality.

When adjusting the interval task size over time there has been a known indeterminate behavior. If the user defined configuration manager of the runner is interested in adjusting task count per interval from 3, to 9, to 27 the metrics reports may go from reporting groups of 3 to groups of 27 and skip over one or more groups of the middle task count intent size (9).

This change adjusts the logic to be 1-1 or 100% deterministic with load generation task count blocks without sacrificing much efficiency on reporting statistics per interval given existing back-pressure logic.

This is achieved by using a single slice of ints in a circular buffer fashion that takes constant time to read and write. Overflows of this buffer are not possible given other assurances that exist in the code.

@josephcopenhaver josephcopenhaver merged commit e321ff8 into main Nov 29, 2023
1 check passed
@josephcopenhaver josephcopenhaver deleted the jpcope/improved-sampling branch November 29, 2023 05:30
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