benchmark_harness 0.1.1 → 0.1.2

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{benchmark_harness}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Daniel Higginbotham"]
@@ -44,9 +44,11 @@ class BenchmarkHarness
44
44
  def print
45
45
  label_size = STATS_HUMAN.max{|a, b| a.size <=> b.size}.size
46
46
  puts sprintf("%#{label_size}s %d", "Samples:", self.size)
47
- puts "Displaying user, system, children user, children system, real"
48
- STATS_HUMAN.each_with_index do |label, i|
49
- puts sprintf("%#{label_size}s: %g %g %g %g %g", label, *KEYS.collect{|k| self.send(STATS[i], k)})
47
+ if self.size > 0
48
+ puts "Displaying user, system, children user, children system, real"
49
+ STATS_HUMAN.each_with_index do |label, i|
50
+ puts sprintf("%#{label_size}s: %g %g %g %g %g", label, *KEYS.collect{|k| self.send(STATS[i], k)})
51
+ end
50
52
  end
51
53
  end
52
54
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark_harness
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Higginbotham