Skip to content

Commit 7cc3336

Browse files
committed
Add bisection capability
1 parent 940bf67 commit 7cc3336

3 files changed

Lines changed: 562 additions & 0 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ work
1616
pom.xml.versionsBackup
1717
dependency-reduced-pom.xml
1818
/log.txt
19+
/bisect
20+
*.backup

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ Use the `run-libs.sh` script to compare different key-value store libraries:
8383
The benchmark auto-scales based on available RAM and caps at 1 million entries.
8484
Results are written to `target/benchmark-libs/`.
8585

86+
**File handle limit:** Benchmark mode requires at least 1 million file handles for RocksDB and LevelDB LSM operations:
87+
88+
```bash
89+
ulimit -n 1000000
90+
./run-libs.sh benchmark
91+
```
92+
93+
The script will check and abort if the limit is too low.
94+
8695
**Resumption:** The script skips completed runs by checking for existing result files. For a fresh run, remove the output directory:
8796

8897
```bash
@@ -184,6 +193,30 @@ Reports are published to:
184193
3. Review and edit commentary in report scripts if needed, then re-run
185194
4. Publish: `./publish-results.sh` (run twice, once after each report generation)
186195

196+
### Performance Bisection
197+
198+
The `run-bisect.sh` script uses bisection to find the commit that introduced a performance regression:
199+
200+
```bash
201+
./run-bisect.sh
202+
```
203+
204+
Configure the bisection by editing variables at the top of the script:
205+
- `START_COMMIT`: Known good commit (full hash)
206+
- `END_COMMIT`: Known bad commit (full hash)
207+
- `BENCHMARK_NAME`: Full benchmark qualifier (eg `LmdbJavaAgrona.write`)
208+
- `MAX_BISECTIONS`: Maximum bisection iterations (default 10)
209+
210+
The script:
211+
- Tests endpoint commits to confirm regression
212+
- Bisects the commit range at 50% intervals
213+
- Uses distance-based decision making (closer to good or bad endpoint)
214+
- Uses the system LMDB library (`/usr/lib/liblmdb.so`) for all tests
215+
- Caches built JARs and benchmark results to avoid rebuilding
216+
- Generates a summary report with an asterisk marking the regression commit
217+
218+
Results are saved in `bisect/results/` with a chronologically-sorted summary report showing scores and percentage changes. To re-run with fresh benchmarks, delete `bisect/results/*.json`.
219+
187220
## Version Management
188221

189222
Update all dependency and plugin versions:

0 commit comments

Comments
 (0)