easy_bench 1.0 → 1.0.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.
Files changed (2) hide show
  1. data/lib/easy_bench.rb +7 -2
  2. metadata +3 -2
data/lib/easy_bench.rb CHANGED
@@ -4,7 +4,7 @@ require 'sometimes_memoize'
4
4
  class EasyBench
5
5
  extend Forwardable
6
6
 
7
- VERSION = '1.0'
7
+ VERSION = '1.0.1'
8
8
 
9
9
  attr_reader :dataset
10
10
 
@@ -60,7 +60,12 @@ class EasyBench
60
60
  sometimes_memoize :total_run_time
61
61
 
62
62
  def ave_run_time
63
- (self.total_run_time / self.total_runs)
63
+ tr = self.total_runs
64
+ if 0 == tr
65
+ nil
66
+ else
67
+ (self.total_run_time / self.total_runs)
68
+ end
64
69
  end
65
70
 
66
71
  def report(bars=false)
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- version: "1.0"
8
+ - 1
9
+ version: 1.0.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - Ben Lund
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-05-05 00:00:00 +01:00
18
+ date: 2011-05-26 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency