benelux 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,12 @@
1
1
  BENELUX, CHANGES
2
2
 
3
+
4
+ #### 0.5.3 (2009-11-16) ###############################
5
+
6
+ * FIXED: Process dead threads only once
7
+ * FIXED: Copy default tags when rotating timelines
8
+
9
+
3
10
  #### 0.5.2 (2009-11-02) ###############################
4
11
 
5
12
  * ADDED: Selectable#rfilter
@@ -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.2"
4
+ s.version = "0.5.3"
5
5
  s.summary = "Benelux: A mad timeline for Ruby codes"
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
@@ -5,7 +5,7 @@ require 'thwait'
5
5
  require 'selectable'
6
6
 
7
7
  module Benelux
8
- VERSION = "0.5.2"
8
+ VERSION = "0.5.3"
9
9
  NOTSUPPORTED = [Class, Object, Kernel]
10
10
 
11
11
  class BeneluxError < RuntimeError; end
@@ -34,6 +34,7 @@ module Benelux
34
34
  @tracks = SelectableHash.new
35
35
  @timeline = Timeline.new
36
36
  @known_threads = []
37
+ @processed_dead_threads = []
37
38
 
38
39
  @@mutex = Mutex.new
39
40
  @@debug = false
@@ -81,7 +82,8 @@ module Benelux
81
82
  def Benelux.update_global_timeline
82
83
  @@mutex.synchronize do
83
84
  dthreads = Benelux.known_threads.select { |t|
84
- !t.timeline.nil? && (t.nil? || !t.status)
85
+ !t.timeline.nil? && (t.nil? || !t.status) &&
86
+ !@processed_dead_threads.member?(t)
85
87
  }
86
88
  # Threads that have rotated timelines
87
89
  rthreads = Benelux.known_threads.select { |t|
@@ -96,7 +98,9 @@ module Benelux
96
98
  dtimelines.push t.rotated_timelines.shift
97
99
  end
98
100
  }
101
+ Benelux.ld [:update_global_timeline, dthreads.size, rthreads.size, dtimelines.size].inspect
99
102
  tl = Benelux.timeline.merge! *dtimelines
103
+ @processed_dead_threads.push *dthreads
100
104
  tl
101
105
  end
102
106
  end
@@ -6,9 +6,10 @@ class Thread
6
6
  attic :track_name
7
7
  attic :rotated_timelines
8
8
  def rotate_timeline
9
- prev = self.timeline
9
+ self.rotated_timelines << self.timeline
10
+ tags = self.timeline.default_tags.clone
10
11
  self.timeline = Benelux::Timeline.new
11
- self.rotated_timelines << prev
12
+ self.timeline.default_tags = tags
12
13
  self.timeline
13
14
  end
14
15
  end
@@ -125,7 +125,7 @@ module Benelux
125
125
  cmd = Benelux.packed_method #{@klass}, :#{@meth}
126
126
  ret = #{@aliaz}(*args, &block)
127
127
  count = cmd.determine_count(args, ret)
128
- Benelux.ld "COUNT(:#{@meth}): \#{count}"
128
+ #Benelux.ld "COUNT(:#{@meth}): \#{count}"
129
129
  Benelux.thread_timeline.add_count :'#{@meth}', count
130
130
  ret
131
131
  end
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.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-02 00:00:00 -05:00
12
+ date: 2009-11-16 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency