# Copyright (c) 2022 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 # sampling functionality of the Agent. class SamplingConfiguration < BaseConfiguration # @return [Integer, nil] attr_reader :baseline # @return [Integer, nil] attr_reader :request_frequency # @return [Integer, nil] attr_reader :response_frequency # @return [Integer, nil] attr_reader :window_ms def initialize hsh = {} @enable = traverse_config(hsh, :enable) @baseline = traverse_config(hsh, :baseline) @request_frequency = traverse_config(hsh, :request_frequency) @response_frequency = traverse_config(hsh, :response_frequency) @window_ms = traverse_config(hsh, :window_ms) end # @return [Boolean, false] def enable !!@enable end end end end