Lightweight dynamic build batching algorithms for continuous integration
摘要
Continuous Integration (CI) is a widely adopted process in software engineering that virtually merges developers’ pull requests with the code base to perform builds and tests essential for quality assurance. CI, however, is also an expensive process, due to the large number of pull requests that are pushed by developers on a daily basis. To reduce the cost of CI, many companies adopt batching algorithms that combine several commits into a single build, either with a fixed or a dynamically evolving batch size. While a successful, dynamic batching technique has been proposed by earlier work, we propose a fully online, more flexible dynamic batching technique that can be configured on-the-fly and updates batch sizes only based on the outcome of the previous batch build. Empirical evaluation on 286,848 commits from 50 open-source projects using TravisCI shows that our lightweight batching technique can perform equally well to the more complex state-of-the-art batching techniques, and save a median of 4.75% more builds than static batching techniques.