$μ$OpTime:利用稳定性指标静态缩短微基准测试套件的执行时间
$μ$OpTime: Statically Reducing the Execution Time of Microbenchmark Suites Using Stability Metrics
AI总结:
提出 $μ$OpTime,依据历史完整运行与稳定性指标为每个微基准测试静态配置最少测量重复次数,从而显著缩短套件执行时间并可靠支持 CI/CD 性能回退检测。
摘要:
性能回退对软件质量有巨大影响。在回退进入生产环境之前发现它们的一种方法是在部署前执行性能测试,例如使用在子程序级别测量性能的微基准测试。在包含许多微基准测试的项目中,由于需要重复执行以获得准确结果,这可能耗时数小时,使其不适合在 CI/CD 流水线中频繁使用。我们提出 $μ$OpTime,这是一种通过为每个微基准测试配置重复次数来缩短微基准测试套件执行时间的静态方法。基于先前一次完整微基准测试套件运行的结果,$μ$OpTime 使用统计稳定性指标确定仍能产生准确结果的最少(测量)重复次数。我们通过一项实验研究评估 $μ$OpTime,该研究涵盖以两种编程语言编写的 14 个开源项目和五种稳定性指标。结果表明:(i)$μ$OpTime 将套件总执行时间(测量阶段)最多缩短 95.83%(Go)和 94.17%(Java);(ii)稳定性指标的选择取决于项目和编程语言;(iii)对于 Java 项目必须考虑微基准测试预热阶段(这可能带来更高的缩短比例);以及(iv)$μ$OpTime 可用于在 CI/CD 流水线中可靠地检测性能回退。
英文摘要:
Performance regressions have a tremendous impact on the quality of software. One way to catch regressions before they reach production is executing performance tests before deployment, e.g., using microbenchmarks, which measure performance at subroutine level. In projects with many microbenchmarks, this may take several hours due to repeated execution to get accurate results, disqualifying them from frequent use in CI/CD pipelines. We propose $μ$OpTime, a static approach to reduce the execution time of microbenchmark suites by configuring the number of repetitions for each microbenchmark. Based on the results of a full, previous microbenchmark suite run, $μ$OpTime determines the minimal number of (measurement) repetitions with statistical stability metrics that still lead to accurate results. We evaluate $μ$OpTime with an experimental study on 14 open-source projects written in two programming languages and five stability metrics. Our results show that (i) $μ$OpTime reduces the total suite execution time (measurement phase) by up to 95.83% (Go) and 94.17% (Java), (ii) the choice of stability metric depends on the project and programming language, (iii) microbenchmark warmup phases have to be considered for Java projects (potentially leading to higher reductions), and (iv) $μ$OpTime can be used to reliably detect performance regressions in CI/CD pipelines.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。