class Mmtrix::Agent::Commands::XraySession
Attributes
command_arguments[R]
duration[R]
id[R]
key_transaction_name[R]
requested_trace_count[R]
sample_period[R]
xray_session_name[R]
Public Class Methods
new(command_arguments)
click to toggle source
# File lib/mmtrix/agent/commands/xray_session.rb, line 17 def initialize(command_arguments) @command_arguments = command_arguments @id = command_arguments.fetch("x_ray_id", nil) @xray_session_name = command_arguments.fetch("xray_session_name", "") @key_transaction_name = command_arguments.fetch("key_transaction_name", "") @requested_trace_count = command_arguments.fetch("requested_trace_count", 100) @duration = command_arguments.fetch("duration", 86400) @sample_period = command_arguments.fetch("sample_period", 0.1) @run_profiler = command_arguments.fetch("run_profiler", true) end
Public Instance Methods
activate()
click to toggle source
# File lib/mmtrix/agent/commands/xray_session.rb, line 36 def activate @active = true @start_time = Time.now end
active?()
click to toggle source
# File lib/mmtrix/agent/commands/xray_session.rb, line 28 def active? @active end
deactivate()
click to toggle source
# File lib/mmtrix/agent/commands/xray_session.rb, line 41 def deactivate @active = false end
finished?()
click to toggle source
# File lib/mmtrix/agent/commands/xray_session.rb, line 49 def finished? @start_time + @duration < Time.now end
requested_period()
click to toggle source
# File lib/mmtrix/agent/commands/xray_session.rb, line 45 def requested_period @sample_period end
run_profiler?()
click to toggle source
# File lib/mmtrix/agent/commands/xray_session.rb, line 32 def run_profiler? @run_profiler && Mmtrix::Agent.config[:'xray_session.allow_profiles'] end