一句话:探索发布流水线中现成的测试能否作为性能测试,发现多数性能改进可由少数测试体现,并分析影响因素。
性能测试成本高、耗时长,难以融入常见的DevOps流程。本文探索发布流水线中常规执行的现成测试能否充当性能测试。从Hadoop和Cassandra收集127个性能问题,评估修复前后这些测试的性能表现。发现大多数性能修复带来的改进可通过现成测试体现,但仅极少数测试能展示改进。通过人工检查,识别出八种测试无法体现性能改进的原因。最后构建随机森林分类器,确定影响测试能否体现性能改进的重要因素,发现测试代码本身及其覆盖的源代码是重要因素,而与性能修复代码变更相关的因素重要性较低。研究为实践者减少性能保障活动中测试设计与利用的工作量提供指导。
Performance is one of the important aspects of software quality. Performance issues exist widely in software systems, and the process of fixing the performance issues is an essential step in the release cycle of software systems. Although performance testing is widely adopted in practice, it is still expensive and time-consuming. In particular, the performance testing is usually conducted after the system is built in a dedicated testing environment. The challenges of performance testing make it difficult to fit into the common DevOps process in software development. On the other hand, there exist a large number of tests readily available, that are executed regularly within the release pipeline during software development. In this paper, we perform an exploratory study to determine whether such readily available tests are capable of serving as performance tests. In particular, we would like to see whether the performance of these tests can demonstrate performance improvements obtained from fixing real-life performance issues. We collect 127 performance issues from Hadoop and Cassandra, and evaluate the performance of the readily available tests from the commits before and after the performance issue fixes. We find that most of the improvements from the fixes to performance issues can be demonstrated using the readily available tests in the release pipeline. However, only a very small portion of the tests can be used for demonstrating the improvements. By manually examining the tests, we identify eight reasons that a test cannot demonstrate performance improvements even though it covers the changed source code of the issue fix. Finally, we build random forest classifiers determining the important metrics influencing the readily available tests (not) being able to demonstrate performance improvements from issue fixes. We find that the test code itself and the source code covered by the test are important factors, while the factors related to the code changes in the performance issues fixes have a low importance. Practitioners may focus on designing and improving the tests, instead of fine-tuning tests for different performance issues fixes. Our findings can be used as a guideline for practitioners to reduce the amount of effort spent on leveraging and designing tests that run in the release pipeline for performance assurance activities.
DOI 原文 ·
@inproceedings{paperbot5603,
title = {Towards the use of the readily available tests from the release pipeline as performance tests},
author = {Zishuo Ding and Jinfu Chen and Weiyi Shang},
booktitle = {ICSE},
year = {2020},
doi = {10.1145/3377811.3380351}
}