Skip to content

Commit 5e981bf

Browse files
committed
Update read me
1 parent 2d17fc3 commit 5e981bf

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

experiments/REGRESSION_DETECTION.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Automated system to detect performance regressions in circuit breaker experiment
99
## How It Works
1010

1111
1. **Baseline Collection**: Collect 5-10 historical "good" experiment runs for each experiment type
12-
2. **Percentile Analysis**: Calculate 3rd, 50th, and 97th percentiles for key metrics
13-
3. **Control Limits**: Set bounds at 3rd-97th percentile range (covers ~90% of historical variation)
12+
2. **Percentile Analysis**: Calculate 5th, 55th, and 95th percentiles for key metrics
13+
3. **Control Limits**: Set bounds at 5th-95th percentile range (covers ~90% of historical variation)
1414
4. **Violation Detection**: Flag experiment if >30% of time windows fall outside percentile bounds
1515
5. **Multi-metric Evaluation**: Check deviation from target, error rates, and rejection rates
1616
6. **Automated CI Integration**: GitHub Actions automatically runs full pipeline on every PR
@@ -84,13 +84,13 @@ All thresholds are easily adjustable in `regression_config.rb`:
8484
```ruby
8585
module RegressionConfig
8686
# Percentile bounds for control limits
87-
LOWER_PERCENTILE = 3
88-
UPPER_PERCENTILE = 97
87+
LOWER_PERCENTILE = 5
88+
UPPER_PERCENTILE = 95
8989

9090
# Violation thresholds (what % of time windows can violate bounds)
91-
DEVIATION_VIOLATION_THRESHOLD = 0.3
92-
ERROR_RATE_VIOLATION_THRESHOLD = 0.3
93-
REJECTION_RATE_VIOLATION_THRESHOLD = 0.3
91+
DEVIATION_VIOLATION_THRESHOLD = 0.5
92+
ERROR_RATE_VIOLATION_THRESHOLD = 0.8
93+
REJECTION_RATE_VIOLATION_THRESHOLD = 0.8
9494

9595
# Minimum baseline runs needed
9696
MIN_BASELINE_RUNS = 10

experiments/compute_baselines.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env ruby
22
# frozen_string_literal: true
33

4+
# This script computes the percentiles for the baseline data and saves them to a file.
5+
# Usage: ruby compute_baselines.rb
6+
47
require_relative "regression_config"
58

69
MID_PERCENTILE = RegressionConfig::LOWER_PERCENTILE + (RegressionConfig::UPPER_PERCENTILE - RegressionConfig::LOWER_PERCENTILE) / 2

experiments/detect_regressions.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env ruby
22
# frozen_string_literal: true
33

4+
# This script detects regressions in the experiments by comparing the current experiment results to the baseline data.
5+
# Usage: ruby detect_regressions.rb
46
require_relative "regression_config"
57

68
def load_baseline(experiment_name)

0 commit comments

Comments
 (0)