ruby_micro_benchmarks 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ruby_micro_benchmarks.rb +2 -2
- metadata +2 -2
@@ -2,7 +2,7 @@ require 'benchmark'
|
|
2
2
|
|
3
3
|
def head
|
4
4
|
$stderr.puts RUBY_DESCRIPTION
|
5
|
-
$stderr.printf "%-
|
5
|
+
$stderr.printf "%-31s times user system total real\n", ''
|
6
6
|
end
|
7
7
|
|
8
8
|
def run_benchmarks
|
@@ -26,7 +26,7 @@ end
|
|
26
26
|
|
27
27
|
def measure(title, input_data, count, &block)
|
28
28
|
input_string = input_data ? " (#{input_data.size}):" : ''
|
29
|
-
$stderr.printf "%-30s ", title + input_string
|
29
|
+
$stderr.printf "%-30s x%-10d", title + input_string, count
|
30
30
|
$stderr.puts Benchmark.measure {
|
31
31
|
count.times { block.call(input_data) }
|
32
32
|
}.to_s
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_micro_benchmarks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.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: 2011-10-
|
12
|
+
date: 2011-10-22 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: A set of Ruby benchmarks for testing several Ruby methods and practice.
|
15
15
|
email: plashchynski@gmail.com
|