Class: Groonga::QueryLog::Command::DetectMemoryLeak
- Inherits:
-
Object
- Object
- Groonga::QueryLog::Command::DetectMemoryLeak
- Defined in:
- lib/groonga/query-log/command/detect-memory-leak.rb
Instance Method Summary collapse
-
#initialize ⇒ DetectMemoryLeak
constructor
A new instance of DetectMemoryLeak.
- #run(command_line) ⇒ Object
Constructor Details
#initialize ⇒ DetectMemoryLeak
Returns a new instance of DetectMemoryLeak.
27 28 29 |
# File 'lib/groonga/query-log/command/detect-memory-leak.rb', line 27 def initialize @options = MemoryLeakDetector::Options.new end |
Instance Method Details
#run(command_line) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/groonga/query-log/command/detect-memory-leak.rb', line 31 def run(command_line) input_paths = create_parser.parse(command_line) detector = MemoryLeakDetector.new(@options) input_paths.each do |input_path| File.open(input_path) do |input| detector.detect(input) end end true end |