Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
spec/const_get_speed_spec.rb | 33 | 32 | 100.00%
|
100.00%
|
Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.
1 module ASIR |
2 module Test |
3 module NamespaceCost |
4 module Relative |
5 def self.m |
6 Exception |
7 end |
8 end |
9 module Absolute |
10 def self.m |
11 ::Exception |
12 end |
13 end |
14 end |
15 end |
16 end |
17 |
18 describe 'Namespace Costs' do |
19 it "uses dynamic namespacing" do |
20 do_it ::ASIR::Test::NamespaceCost::Relative |
21 end |
22 it "uses static namespacing" do |
23 do_it ::ASIR::Test::NamespaceCost::Absolute |
24 end |
25 def do_it obj |
26 t0 = Time.now |
27 10_000_000.times do |
28 obj.m |
29 end |
30 t1 = Time.now |
31 puts "#{obj} #{t1.to_f - t0.to_f}" |
32 end |
33 end |
Generated on Fri Jan 27 17:37:46 -0600 2012 with rcov 0.9.8