perf(internal/civisibility): cache impacted-test decisions#4701
Conversation
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 1d14ff4 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-04-28 12:29:33 Comparing candidate commit 1d14ff4 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 153 metrics, 8 unstable metrics.
|
dd18ece
into
main
Codecov Report❌ Patch coverage is
Additional details and impacted files
🚀 New features to boost your workflow:
|
What does this PR do?
Optimizes CI Visibility impacted-test analysis by caching
IsImpacteddecisions per analyzer and replacing per-call temporary test bitmap allocation with a direct bitmap range intersection check.The implementation preserves existing behavior:
IsImpactedcallsIt also adds benchmarks for repeated cached calls, cold distinct ranges, misses, missing-line-info decisions, and the direct bitmap range check.
Motivation
Profiling after the previous CI Visibility optimizations showed
IsImpactedstill doing repeated work on retries/subtests. The previous flow rebuilt a temporary bitmap for each test range and scanned modified files on every call. This change keeps the same decisions while avoiding that repeated allocation and memoizing repeated source range lookups.Latest local benchmark sample:
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Local verification:
Notes:
make lint,make test,make generate, andmake fix-moduleswere not run directly; the narrower local commands above were run against the affected CI Visibility packages, and no generated files or module files changed.