arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.05100cs.SEcs.AIcs.LGcs.PF
收藏

AI驱动的Java性能测试:在结果质量与测试时间之间取得平衡

AI-driven Java Performance Testing: Balancing Result Quality with Testing Time

University of L’Aquila(拉奎拉大学)

Luca Traini, Federico Di Menna, Vittorio Cortellessa

AI总结:

针对Java性能测试中预热阶段估计不准导致结果质量差或测试时间长的问题,提出基于AI时间序列分类的动态终止预热框架,在50万JMH测量片段上实验,最多使35.3%的微基准测试获得质量或时间的净提升。

摘要:

性能测试旨在发现软件系统的效率问题。为了兼具有效性与实用性,性能测试的设计必须在结果质量与测试时间之间实现合理权衡。这一问题在Java场景下尤为具有挑战性,因为即时编译的存在,软件会经历一个执行预热阶段。在该阶段中,性能测量值会出现剧烈波动,可能对性能测试结果的质量产生负面影响。然而现有方法往往对预热阶段的估计欠佳,导致预热迭代次数不足或过多,进而可能降低结果质量或增加测试时间,目前对于如何妥善解决这一问题仍缺乏共识。\n本文提出并研究了一种基于AI的框架,可在运行时动态终止预热迭代。具体而言,该框架利用人工智能在时间序列分类(TSC)领域的最新进展,在测试执行过程中预测预热阶段的结束点。我们在从JMH微基准测试执行中获取的50万个测量片段上训练了三种不同的TSC模型,并开展了实验。研究发现,我们的框架显著提升了现有实践最优方法与前沿方法给出的预热估计的准确性。更高的估计准确率使得最多35.3%的微基准测试在结果质量或测试时间方面获得了净提升。本研究表明,整合AI来动态估计预热阶段的结束点,能够提升Java性能测试的成本效益。

英文摘要:

Performance testing aims at uncovering efficiency issues of software systems. In order to be both effective and practical, the design of a performance test must achieve a reasonable trade-off between result quality and testing time. This becomes particularly challenging in Java context, where the software undergoes a warm-up phase of execution, due to just-in-time compilation. During this phase, performance measurements are subject to severe fluctuations, which may adversely affect quality of performance test results. However, these approaches often provide suboptimal estimates of the warm-up phase, resulting in either insufficient or excessive warm-up iterations, which may degrade result quality or increase testing time. There is still a lack of consensus on how to properly address this problem. Here, we propose and study an AI-based framework to dynamically halt warm-up iterations at runtime. Specifically, our framework leverages recent advances in AI for Time Series Classification (TSC) to predict the end of the warm-up phase during test execution. We conduct experiments by training three different TSC models on half a million of measurement segments obtained from JMH microbenchmark executions. We find that our framework significantly improves the accuracy of the warm-up estimates provided by state-of-practice and state-of-the-art methods. This higher estimation accuracy results in a net improvement in either result quality or testing time for up to +35.3% of the microbenchmarks. Our study highlights that integrating AI to dynamically estimate the end of the warm-up phase can enhance the cost-effectiveness of Java performance testing.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑