大规模C++工程单元测试性能优化研究
DOI:
CSTR:
作者:
作者单位:

北京邮电大学

作者简介:

通讯作者:

中图分类号:

基金项目:

国家自然科学基金项目(面上项目,重点项目,重大项目)


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

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    为了解决自动化单元测试工具在测试大规模C++工程时经常发生内存溢出故障且耗时较长这一问题,在测试流程中引入了缓存优化技术,并提出了一种面向不同测试方式的缓存优化方法。当用户直接对整个工程进行测试时,系统将采用缓存预取的方式,通过设计的缓存预取模型,在缓存出现读缺失之前为其提供数据块;当用户对单个文件进行测试时,系统将采用改进的GDSF替换算法进行缓存替换。实验表明,该方法能够有效的避免此类单元测试工具发生内存溢出故障并减少了测试的时间,使其支持的被测工程规模由5000行左右增加至十几万行,大大提升了系统的性能。

    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.

    参考文献
    相似文献
    引证文献
引用本文

刘堂臣,王雅文,宫云战.大规模C++工程单元测试性能优化研究计算机测量与控制[J].,2022,30(2):17-23.

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2021-11-18
  • 最后修改日期:2021-12-15
  • 录用日期:2021-12-31
  • 在线发布日期: 2022-02-22
  • 出版日期:
文章二维码