Class: Derrick::Inspector
- Inherits:
-
Object
- Object
- Derrick::Inspector
- Defined in:
- lib/derrick/inspector.rb
Instance Attribute Summary collapse
-
#progress ⇒ Object
readonly
Returns the value of attribute progress.
-
#redis ⇒ Object
readonly
Returns the value of attribute redis.
Instance Method Summary collapse
-
#initialize(redis, context) ⇒ Inspector
constructor
A new instance of Inspector.
- #report ⇒ Object
Constructor Details
Instance Attribute Details
#progress ⇒ Object (readonly)
Returns the value of attribute progress.
7 8 9 |
# File 'lib/derrick/inspector.rb', line 7 def progress @progress end |
#redis ⇒ Object (readonly)
Returns the value of attribute redis.
7 8 9 |
# File 'lib/derrick/inspector.rb', line 7 def redis @redis end |
Instance Method Details
#report ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/derrick/inspector.rb', line 15 def report keys_queue = Queue.new stats_queue = Queue.new Thread.new { Collector.new(@redis, keys_queue, @progress, @context).run } @context.concurrency.times do Thread.new { Fetcher.new(@redis, keys_queue, stats_queue, @progress).run } end aggregator = Aggregator.new(stats_queue, @context) aggregator.run aggregator.patterns end |