benelux 0.5.9 → 0.5.10

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.txt CHANGED
@@ -1,6 +1,10 @@
1
1
  BENELUX, CHANGES
2
2
 
3
- #### 0.5.9 (2010-03-05) ###############################
3
+ #### 0.5.10 (2010-03-15) ###############################
4
+
5
+ * ADDED: Benelux.reset
6
+
7
+ #### 0.5.9 (2010-03-14) ###############################
4
8
 
5
9
  * ADDED: Benelux::Stats::Calculator#from_hash
6
10
  * ADDED: Benelux::Stats::Group#sumsq
data/benelux.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "benelux"
3
3
  s.rubyforge_project = 'benelux'
4
- s.version = "0.5.9"
4
+ s.version = "0.5.10"
5
5
  s.summary = "Benelux: A mad way to time Ruby codes"
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
data/lib/benelux.rb CHANGED
@@ -4,7 +4,7 @@ require 'thwait'
4
4
  require 'selectable'
5
5
 
6
6
  module Benelux
7
- VERSION = "0.5.9"
7
+ VERSION = "0.5.10"
8
8
  NOTSUPPORTED = [Class, Object, Kernel]
9
9
 
10
10
  class BeneluxError < RuntimeError; end
@@ -30,13 +30,16 @@ module Benelux
30
30
  attr_reader :known_threads
31
31
  end
32
32
 
33
- @packed_methods = {}
34
- @tracks = SelectableHash.new
35
- @timeline = Timeline.new
36
- @timeline_chunk = Timeline.new # See: update_global_timeline
37
- @timeline_updates = 0
38
- @known_threads = []
39
- @processed_dead_threads = []
33
+ def Benelux.reset
34
+ @packed_methods = {}
35
+ @tracks = SelectableHash.new
36
+ @timeline = Timeline.new
37
+ @timeline_chunk = Timeline.new # See: update_global_timeline
38
+ @timeline_updates = 0
39
+ @known_threads = []
40
+ @processed_dead_threads = []
41
+ end
42
+ reset
40
43
 
41
44
  @@mutex = Mutex.new
42
45
  @@debug = false
data/lib/benelux/stats.rb CHANGED
@@ -148,7 +148,7 @@ module Benelux
148
148
  args.flatten.each { |s| sample(s) }
149
149
  end
150
150
 
151
- def merge!(other)
151
+ def merge!(other)
152
152
  if @sum == 0
153
153
  @min = @max = other.mean
154
154
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benelux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.5.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum