# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true module Contrast module Config # Common Configuration settings. Those in this section pertain to the # Heap Dump collection functionality of the Agent. class HeapDumpConfiguration < BaseConfiguration KEYS = { enable: Contrast::Config::DefaultValue.new(Contrast::Utils::ObjectShare::FALSE), # should dumps be taken path: Contrast::Config::DefaultValue.new('contrast_heap_dumps'), # dir to which dumps should be saved delay_ms: Contrast::Config::DefaultValue.new(10_000), # time, in ms, after initialization to delay before taking dump window_ms: Contrast::Config::DefaultValue.new(10_000), # ms between each dump count: Contrast::Config::DefaultValue.new(5), # number of dumps to take clean: Contrast::Config::DefaultValue.new(Contrast::Utils::ObjectShare::FALSE) # remove temporary objects }.cs__freeze def initialize hsh super(hsh, KEYS) end end end end