大规模C++工程单元测试性能优化研究  

Research on Unit Testing Performance Optimization of Large-scale C++Project

在线阅读下载全文

作  者:刘堂臣 王雅文[1] 宫云战[1] LIU Tangchen;WANG Yawen;GONG Yunzhan(State Key Laboratory of Networking and Switching Technology,Beijing University of Posts and Telecommunications,Beijing 100876,China)

机构地区:[1]北京邮电大学网络与交换技术国家重点实验室,北京100876

出  处:《计算机测量与控制》2022年第2期17-23,共7页Computer Measurement &Control

基  金:国家自然科学基金项目(U1736110)。

摘  要:为了解决自动化单元测试工具在测试大规模C++工程时经常发生内存溢出故障且耗时较长这一问题,在测试流程中引入了缓存优化技术,并提出了一种面向不同测试方式的缓存优化方法;当用户直接对整个工程进行测试时,系统将采用缓存预取的方式,通过设计的缓存预取模型,在缓存出现读缺失之前为其提供数据块;当用户对单个文件进行测试时,系统将采用改进的GDSF替换算法进行缓存替换;实验表明,该方法能够有效地避免此类单元测试工具发生内存溢出故障并减少了测试的时间,使其支持的被测工程规模由5000行左右增加至十几万行,大大提升了系统的性能。In order to solve the problem that the automatic unit test tool often occurs memory overflow failure and spends a long time in 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 before the cache reads and misses;When the user tests a single file,the system will use the improved GDSF replacement algorithm for cache replacement.Experimental results show that this method can effectively avoid memory overflow failures for such unit test tools and reduces the test time.The scale of the tested project is supported,it increases from about 5,000 lines to more than 100,000 lines,and the performance of the system is greatly improved.

关 键 词:单元测试 大规模工程 缓存替换算法 缓存预取 性能优化 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象