lib/salus.rb in salus-0.1.3 vs lib/salus.rb in salus-0.2.0

- old
+ new

@@ -127,15 +127,17 @@ @@_groups.each { |k, v| data[k] = v.to_h } block.call(data) end def tick + log DEBUG, "Tick..." lazy_eval return if @@_groups.empty? pause = (Salus.interval - Salus.tick_timeout - Salus.render_timeout) / 2 pause = 1 if (pause <= 0) + log DEBUG, "Starting collection. Top-level groups to spawn: #{@@_groups.count}" latch = CountDownLatch.new(@@_groups.count) @@_groups.each do |k, v| pool.process do begin v.tick @@ -148,9 +150,10 @@ end latch.wait(Salus.tick_timeout + pause) log DEBUG, "Collection finished. Threads: #{pool.spawned} spawned, #{pool.waiting} waiting, #{Thread.list.count} total" return if @@_renders.empty? + log DEBUG, "Starting #{@_renders.count} renderers" latch = CountDownLatch.new(@@_renders.count) @@_renders.each do |v| pool.process do begin v.render(root)