rbm 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rbm.rb +1 -1
- data/lib/rbm/fragment.rb +6 -6
- data/lib/rbm/version.rb +1 -1
- metadata +3 -3
data/lib/rbm.rb
CHANGED
data/lib/rbm/fragment.rb
CHANGED
@@ -10,14 +10,14 @@ module RBM
|
|
10
10
|
|
11
11
|
def run(bm, times, init = nil, cleanup = nil)
|
12
12
|
fragment_name = (name || @@unnamed_fragment.succ!).gsub(/\s+/, "_")
|
13
|
-
|
13
|
+
binding = Object.new.send(:binding)
|
14
14
|
|
15
15
|
bm.report(name) do
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
eval(init, binding, "#{fragment_name}_init", 0) if init
|
17
|
+
eval(prerun, binding, "#{fragment_name}_prerun", 0) if prerun
|
18
|
+
eval("#{times}.times { #{code} }", binding, "#{fragment_name}", 0)
|
19
|
+
eval(postrun, binding, "#{fragment_name}_postrun", 0) if postrun
|
20
|
+
eval(cleanup, binding, "#{fragment_name}_cleanup", 0) if cleanup
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
data/lib/rbm/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-25 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: rbm lets you benchmark varies code fragments by running them a specified
|
15
15
|
number of times along with code fragments before and after all of the fragments
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
46
|
version: '0'
|
47
47
|
requirements: []
|
48
48
|
rubyforge_project:
|
49
|
-
rubygems_version: 1.8.
|
49
|
+
rubygems_version: 1.8.11
|
50
50
|
signing_key:
|
51
51
|
specification_version: 3
|
52
52
|
summary: rbm is a command line tool for doing quick benchmarks of ruby code.
|