一句话:提出历史感知的 CI 构建结果预测方法 BuildFast,借助失败特异特征与自适应模型,将失败构建预测 F1 提升 47.5%。
持续集成中的长构建时间带来高昂的人力与计算成本,构建结果预测是缓解该问题的手段之一,但现有方法对失败构建的预测性能较差,且未针对实际使用场景设计。作者首先对 2,590,917 次构建进行实证研究以刻画真实项目的构建时间,并对 75 名开发者开展问卷调查以了解其对构建结果预测的看法。基于这两项结果,论文提出历史感知方法 BuildFast:通过分析构建日志与变更文件,从紧密相关的历史构建中提取多种失败特异(failure-specific)特征,并设计自适应预测模型,依据上一次构建的结果在两个模型之间切换。实验在 20 个项目上按时间顺序在线预测构建结果,同时度量正确预测带来的收益与错误预测造成的代价,结果显示 BuildFast 在失败构建上的 F1 分数比当时最优方法提升 47.5%。
Long build times in continuous integration (CI) can greatly increase the cost in human and computing resources, and thus become a common barrier faced by software organizations adopting CI. Build outcome prediction has been proposed as one of the remedies to reduce such cost. However, the state-of-the-art approaches have a poor prediction performance for failed builds, and are not designed for practical usage scenarios. To address the problems, we first conduct an empirical study on 2,590,917 builds to characterize build times in real-world projects, and a survey with 75 developers to understand their perceptions about build outcome prediction. Then, motivated by our study and survey results, we propose a new history-aware approach, named BuildFast, to predict CI build outcomes cost-efficiently and practically. We develop multiple failure-specific features from closely related historical builds via analyzing build logs and changed files, and propose an adaptive prediction model to switch between two models based on the build outcome of the previous build. We investigate a practical online usage scenario of BuildFast, where builds are predicted in chronological order, and measure the benefit from correct predictions and the cost from incorrect predictions. Our experiments on 20 projects have shown that BuildFast improved the state-of-the-art by 47.5% in F1-score for failed builds.
DOI 原文 ·
@inproceedings{paperbot5892,
title = {BuildFast},
author = {Bihuan Chen and Linlin Chen and Chen Zhang and Xin Peng},
booktitle = {ASE},
year = {2020},
doi = {10.1145/3324884.3416616}
}