rbm 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rbm/benchmarker.rb +5 -3
- data/lib/rbm/version.rb +1 -1
- metadata +1 -1
data/lib/rbm/benchmarker.rb
CHANGED
@@ -23,11 +23,13 @@ module RBM
|
|
23
23
|
binding = object.send(:binding)
|
24
24
|
|
25
25
|
bm.report(name) do
|
26
|
-
# TODO: figure out how to not eval each loop but still provide a better stack trace
|
27
|
-
|
28
26
|
eval options[:init], binding, "init", 1 if options[:init]
|
29
27
|
eval fragment[:prerun], binding, "#{fragment_name}_prerun", 1 if fragment[:prerun]
|
30
|
-
|
28
|
+
eval <<-EVAL, binding, fragment_name, 0
|
29
|
+
#{options[:times]}.times do
|
30
|
+
#{fragment[:fragment]}
|
31
|
+
end
|
32
|
+
EVAL
|
31
33
|
eval fragment[:postrun], binding, "#{fragment_name}_postrun", 1 if fragment[:postrun]
|
32
34
|
eval options[:cleanup], binding, "cleanup", 1 if options[:cleanup]
|
33
35
|
end
|
data/lib/rbm/version.rb
CHANGED