123456789_123456789_123456789_123456789_123456789_

Class: DEBUGGER__::DAP_TraceInspector::Custom_Recorder

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: DEBUGGER__::ThreadClient::Recorder
Defined in: lib/debug/dap_custom/traceInspector.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(max_log_size: nil) ⇒ Custom_Recorder

[ GitHub ]

  
# File 'lib/debug/dap_custom/traceInspector.rb', line 104

def initialize max_log_size: nil
  if max_log_size
    @max_log_size = max_log_size
  else
    @max_log_size = 50000
  end
  @dropped_trace_cnt = 0
  super()
end

Instance Attribute Details

#dropped_trace_cnt (rw)

[ GitHub ]

  
# File 'lib/debug/dap_custom/traceInspector.rb', line 114

attr_accessor :dropped_trace_cnt

Instance Method Details

#append(frames)

[ GitHub ]

  
# File 'lib/debug/dap_custom/traceInspector.rb', line 116

def append frames
  if @log.size >= @max_log_size
    @dropped_trace_cnt += 1
    @log.shift
  end
  @log << frames
end