Dead code detection in ruby

Does anyone know of a production worthy package commercial or OSS that can detect which lines of code have been executed or not?

We're looking around for some tools that can help us detect dead code in a production environment, running Ruby On Rails 1.8.7

-daniel


In Ruby 1.9.2 you could simply measure coverage without a significant impact on performance. In 1.8.7, however, this would slow down things way too much. Instead you could get an overview of what's used using perftools.rb (with the CPUPROFILE_METHODS=1 option). As far as I know it has virtually no impact on application performance and it would allow you to see what methods have been called, although you would not get any information about the different code paths (ifs and loops and whatnot).


Ruby Toolbox中的代码度量类别提到代码覆盖程序,如rcov,但只涵盖您测试的代码。

链接地址: http://www.djcxy.com/p/50256.html

上一篇: 符号链接创建到RPM spec文件中

下一篇: 红宝石中的死代码检测