Class: PuppetDebugger::InputResponders::Benchmark
- Inherits:
-
PuppetDebugger::InputResponderPlugin
- Object
- PuppetDebugger::InputResponderPlugin
- PuppetDebugger::InputResponders::Benchmark
- Defined in:
- lib/plugins/puppet-debugger/input_responders/benchmark.rb
Constant Summary collapse
- COMMAND_WORDS =
%w[benchmark bm].freeze
- SUMMARY =
'Benchmark your Puppet code.'
- COMMAND_GROUP =
:tools
Instance Attribute Summary
Attributes inherited from PuppetDebugger::InputResponderPlugin
Instance Method Summary collapse
Methods inherited from PuppetDebugger::InputResponderPlugin
command_completion, command_group, command_words, details, execute, #modules_paths, #puppet_debugger_lib_dir, summary
Instance Method Details
#run(args = []) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/plugins/puppet-debugger/input_responders/benchmark.rb', line 12 def run(args = []) if args.count.positive? enable(false) out = debugger.handle_input(args.first) disable out else status = debugger.bench ? disable : enable(true) "Benchmark Mode #{status}" end end |