benchmark_harness 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{benchmark_harness}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
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"]
12
- s.date = %q{2011-03-30}
12
+ s.date = %q{2011-03-31}
13
13
  s.description = %q{harness for running benchmark multiple times and running stats on the results}
14
14
  s.email = %q{daniel@flyingmachinestudios.com}
15
15
  s.extra_rdoc_files = [
@@ -3,7 +3,7 @@ class BenchmarkHarness
3
3
 
4
4
  # order corresponds to values in each sample
5
5
  KEYS = [:user, :system, :children_user, :children_system, :real]
6
- STATS = [:mean, :median, :mode, :range, :min, :max, :standard_deviation, :variance]
6
+ STATS = [:mean, :median, :mode, :range, :min, :max, :sum, :standard_deviation, :variance]
7
7
  STATS_HUMAN = STATS.collect{|s| s.to_s.sub(/_/, " ").capitalize}
8
8
 
9
9
  # Sorts values into named vectors:
@@ -45,9 +45,9 @@ class BenchmarkHarness
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
47
  if self.size > 0
48
- puts "Displaying user, system, children user, children system, real"
48
+ puts sprintf("%#{label_size}s: %10s %10s %10s %10s %10s", "Displaying", "user", "system", "ch.user", "ch.system", "real")
49
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)})
50
+ puts sprintf("%#{label_size}s: %10.4g %10.4g %10.4g %10.4g %10.4g", label, *KEYS.collect{|k| self.send(STATS[i], k)})
51
51
  end
52
52
  end
53
53
  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: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Higginbotham
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-30 00:00:00 -04:00
18
+ date: 2011-03-31 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency