Module: Contrast::Components::HeapDump::ClassMethods
- Includes:
- ComponentBase
- Defined in:
- lib/contrast/components/heap_dump.rb
Overview
A wrapper build around the Common Agent Configuration project to allow for access of the values contained in its parent_configuration_spec.yaml. Specifically, this allows for querying the state of the Heap Dump utility.
Constant Summary
Constants included from ComponentBase
Constants included from Contrast::Config::Diagnostics::Tools
Contrast::Config::Diagnostics::Tools::CHECK
Constants included from Contrast::Config::Diagnostics::SingletonTools
Contrast::Config::Diagnostics::SingletonTools::API_CREDENTIALS, Contrast::Config::Diagnostics::SingletonTools::CONTRAST_MARK
Instance Method Summary collapse
Methods included from ComponentBase
#canon_name, #config_values, #false?, #file_exists?, #stringify_array, #to_effective_config, #true?, #valid_cert?
Methods included from Contrast::Config::Diagnostics::Tools
#add_effective_config_values, #add_single_effective_value
Methods included from Contrast::Config::Diagnostics::SingletonTools
#flatten_settings, #to_config_values, #update_config, #value_to_s
Instance Method Details
#heap_dump_control ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/contrast/components/heap_dump.rb', line 82 def heap_dump_control @_heap_dump_control ||= begin config = ::Contrast::CONFIG&.agent&.heap_dump { enabled: true?(config&.enable), path: File.absolute_path(config&.path), count: config&.count.to_i || 0, window: (config&.window_ms.to_f || 0) / 1000, delay: (config&.delay_ms.to_f || 0) / 1000, clean: true?(config&.clean) } end end |
#heap_dump_enabled? ⇒ Boolean
78 79 80 |
# File 'lib/contrast/components/heap_dump.rb', line 78 def heap_dump_enabled? heap_dump_control[:enabled] end |