Class: GroongaQueryLog::ServerVerifier

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga-query-log/server-verifier.rb

Defined Under Namespace

Classes: GroongaOptions, Options

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ServerVerifier

Returns a new instance of ServerVerifier.



31
32
33
34
35
36
# File 'lib/groonga-query-log/server-verifier.rb', line 31

def initialize(options)
  @options = options
  @queue = SizedQueue.new(@options.request_queue_size)
  @events = Queue.new
  @n_executed_commands = 0
end

Instance Attribute Details

#n_executed_commandsObject (readonly)

Returns the value of attribute n_executed_commands.



30
31
32
# File 'lib/groonga-query-log/server-verifier.rb', line 30

def n_executed_commands
  @n_executed_commands
end

Instance Method Details

#verify(input, &callback) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/groonga-query-log/server-verifier.rb', line 38

def verify(input, &callback)
  @same = true
  @slow = false
  @client_error_is_occurred = false
  producer = run_producer(input, &callback)
  reporter = run_reporter
  producer.join
  @events.push(nil)
  reporter.join
  success?
end