首页 | 本学科首页   官方微博 | 高级检索  
     

大规模C++工程单元测试性能优化研究
引用本文:刘堂臣,王雅文,宫云战.大规模C++工程单元测试性能优化研究[J].计算机测量与控制,2022,30(2):17-23.
作者姓名:刘堂臣  王雅文  宫云战
作者单位:北京邮电大学网络与交换技术国家重点实验室,北京 100876
基金项目:国家自然科学基金项目(面上项目,重点项目,重大项目)
摘    要:为了解决自动化单元测试工具在测试大规模C++工程时经常发生内存溢出故障且耗时较长这一问题,在测试流程中引入了缓存优化技术,并提出了一种面向不同测试方式的缓存优化方法;当用户直接对整个工程进行测试时,系统将采用缓存预取的方式,通过设计的缓存预取模型,在缓存出现读缺失之前为其提供数据块;当用户对单个文件进行测试时,系统将采用改进的GDSF替换算法进行缓存替换;实验表明,该方法能够有效地避免此类单元测试工具发生内存溢出故障并减少了测试的时间,使其支持的被测工程规模由5000行左右增加至十几万行,大大提升了系统的性能。

关 键 词:单元测试  大规模工程  缓存替换算法  缓存预取  性能优化
收稿时间:2021/11/18 0:00:00
修稿时间:2021/12/15 0:00:00

Research on Unit Testing Performance Optimization of Large-scale C++ Project
LIU Tangchen,WANG Yawen,GONG Yunzhan.Research on Unit Testing Performance Optimization of Large-scale C++ Project[J].Computer Measurement & Control,2022,30(2):17-23.
Authors:LIU Tangchen  WANG Yawen  GONG Yunzhan
Affiliation:(State Key Laboratory of Networking and Switching Technology,Beijing University of Posts and Telecommunications,Beijing 100876,China)
Abstract:In order to solve the problem that the automatic unit test tool often occurs memory overflow failure and takes a long time when testing large-scale C++ projects, the cache optimization technology is introduced in the test process, and a cache optimization method for different testing methods is proposed. When the user directly tests the entire project, the system will adopt the cache prefetch method. Through the designed cache prefetch model, it will provide data blocks for the cache before read misses; When the user tests a single file, the system will use the improved GDSF replacement algorithm for cache replacement. Experiments show that this method can effectively avoid memory overflow failures of such unit test tools and reduce the test time. The scale of the tested project supported by it has increased from about 5,000 lines to more than 100,000 lines, which greatly improves the performance of the system.
Keywords:unit test  large-scale project  cache replacement algorithm  cache prefetch  performance optimization
本文献已被 维普 万方数据 等数据库收录!
点击此处可从《计算机测量与控制》浏览原始摘要信息
点击此处可从《计算机测量与控制》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号