benchmark_harness 0.1.0 → 0.1.1

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.0
1
+ 0.1.1
@@ -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.0"
8
+ s.version = "0.1.1"
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"]
@@ -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, :standard_deviation, :variance]
6
+ STATS = [:mean, :median, :mode, :range, :min, :max, :standard_deviation, :variance]
7
7
  STATS_HUMAN = STATS.collect{|s| s.to_s.sub(/_/, " ").capitalize}
8
8
 
9
9
  # Sorts values into named vectors:
@@ -24,7 +24,7 @@ class BenchmarkHarness
24
24
  # also defines the method so that it can optionally take a key.
25
25
  # If they key is present, return result for just that vector;
26
26
  # otherwise return hash of results for all keys/vectors
27
- [:mean, :median, :mode, :range, :standard_deviation, :variance].each do |method_name|
27
+ STATS.each do |method_name|
28
28
  class_eval <<-END
29
29
  def #{method_name}(key = nil)
30
30
  if key
@@ -113,4 +113,14 @@ describe "BenchmarkHarness" do
113
113
  BenchmarkHarness.collections.should be_empty
114
114
  end
115
115
  end
116
+
117
+ describe "#print" do
118
+ it "should print without throwing an error" do
119
+ 2.times{
120
+ StringExample.concatenate_with_plus("Hello ", "Dave")
121
+ }
122
+ lambda{BenchmarkHarness.collections[:plus].print}.should_not raise_error
123
+
124
+ end
125
+ end
116
126
  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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Higginbotham