Feature/292 create lower and upper bound for queries#307
Merged
jathavaan merged 8 commits intoMay 22, 2026
Conversation
15 tasks
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.
This pull request introduces a new, configurable stopping rule for benchmarks, allowing for more precise and efficient execution of timed iterations. The main change is the implementation of a sequential stopping rule based on bootstrapped confidence intervals for high-frequency queries, with an opt-out for long-running, low-variance benchmarks. The documentation and metadata handling have also been updated to reflect and support these changes.
Benchmark stopping rule improvements:
monitordecorator inmonitor.py, which stops benchmark iterations early if a bootstrapped confidence interval on the mean elapsed time meets a configured precision, subject to minimum iteration and time windows, and a ceiling based on theBenchmarkIterationvalue. Long-running benchmarks can opt out and use a fixed iteration count instead. The stopping reason and achieved iterations are now logged and saved as metadata. [1] [2] [3] [4]Documentation updates:
README.mdandCLAUDE.mdto document the new stopping rule, its rationale, and how to configure it for different benchmarks. This includes details on the bootstrapped CI procedure, configuration parameters, and when to use fixed vs. sequential stopping. [1] [2] [3]Metadata and logging enhancements:
_save_run_metadatacalls in bothmonitor.pyandmonitor_cpu_and_ram.pyto record additional metadata: achieved iterations, stopping reason, CI half-width, and summary statistics (mean/median elapsed time). [1] [2]Supporting code and enum changes:
StopReasonenum and updated imports throughout to support new stopping logic and metadata. [1] [2] [3]Refactoring and code clarity:
monitor.pyfor clarity, separating sequential and fixed stopping logic, and improved logging to make benchmark progress and stopping conditions more transparent. [1] [2] [3] [4] [5]