Performance regression testing is essential in large-scale continuous-integration (CI) systems, yet executing full performance suites for every commit is prohibitively expensive. Prior work on performance regression prediction and batch testing has shown independent benefits, but each faces practical limitations: predictive models are rarely integrated into CI decision-making, and conventional batching strategies ignore commit-level heterogeneity. We unify these strands by introducing a risk-aware framework that integrates machine-learned commit risk with adaptive batching. Using Mozilla Firefox as a case study, we construct a production-derived dataset of human-confirmed regressions aligned chronologically with Autoland, and fine-tune ModernBERT, CodeBERT, and LLaMA-3.1 variants to estimate commit-level performance regression risk, achieving up to 0.694 ROC-AUC with CodeBERT. The risk scores drive a family of risk-aware batching strategies, including Risk-Aged Priority Batching and Risk-Adaptive Stream Batching, evaluated through realistic CI simulations. Across thousands of historical Firefox commits, our best overall configuration, Risk-Aged Priority Batching with linear aggregation (RAPB-la), yields a Pareto improvement over Mozilla's production-inspired baseline. RAPB-la reduces total test executions by 32.4%, decreases mean feedback time by 3.8%, maintains mean time-to-culprit at approximately the baseline level, reduces maximum time-to-culprit by 26.2%, and corresponds to an estimated annual infrastructure cost savings of approximately $491K under our cost model. These results demonstrate that risk-aware batch testing can reduce CI resource consumption while improving diagnostic timeliness. To support reproducibility and future research, we release a complete replication package containing all datasets, fine-tuning pipelines, and implementations of our batching algorithms.
翻译:性能回归测试在大规模持续集成系统中至关重要,但对每个提交执行完整的性能测试套件成本过高。先前关于性能回归预测和批量测试的研究已显示其独立优势,但各自面临实际限制:预测模型很少被集成到持续集成决策中,而传统批量策略忽略了提交级别的异构性。我们通过引入一个风险感知框架来统一这些研究方向,该框架将机器学习预测的提交风险与自适应批量测试相结合。以Mozilla Firefox为案例,我们构建了一个包含人工确认回归的生产数据集,按时间顺序与Autoland对齐,并微调ModernBERT、CodeBERT和LLaMA-3.1变体以估计提交级别的性能回归风险,其中CodeBERT实现了0.694的ROC-AUC。风险得分驱动了一系列风险感知的批量策略,包括风险老化优先级批量测试和风险自适应流式批量测试,并通过逼真的持续集成仿真进行评估。在数千个历史Firefox提交中,我们最佳的整体配置——采用线性聚合的风险老化优先级批量测试——相比Mozilla的生产基线实现了帕累托改进。RAPB-la将总测试执行次数减少了32.4%,平均反馈时间降低了3.8%,平均归因时间保持在基线水平附近,最大归因时间减少了26.2%,在我们的成本模型下对应每年约49.1万美元的基础设施成本节约。这些结果表明,风险感知的批量测试能在减少持续集成资源消耗的同时提高诊断时效性。为支持可复现性和未来研究,我们发布了一个完整的复现包,包含所有数据集、微调流程以及批量测试算法的实现。