class GroongaQueryLog::MemoryLeakDetector::Options
Attributes
force_disable_cache[W]
host[RW]
n_tries[RW]
pid[RW]
port[RW]
protocol[RW]
Public Class Methods
new()
click to toggle source
# File lib/groonga-query-log/memory-leak-detector.rb, line 90 def initialize @host = "127.0.0.1" @port = 10041 @protocol = :gqtp @pid = guess_groonga_server_pid @n_tries = 10 @force_disable_cache = true end
Public Instance Methods
create_client(&block)
click to toggle source
# File lib/groonga-query-log/memory-leak-detector.rb, line 103 def create_client(&block) Groonga::Client.open(:host => @host, :port => @port, :protocol => @protocol, &block) end
force_disable_cache?()
click to toggle source
# File lib/groonga-query-log/memory-leak-detector.rb, line 99 def force_disable_cache? @force_disable_cache end
Private Instance Methods
guess_groonga_server_pid()
click to toggle source
# File lib/groonga-query-log/memory-leak-detector.rb, line 111 def guess_groonga_server_pid # This command line works only for ps by procps. pid = `ps -o pid --no-header -C groonga`.strip if pid.empty? nil else pid.to_i end end