Class: ProconBypassMan::Procon::PerformanceMeasurement::SpanTransferBuffer
- Inherits:
-
Object
- Object
- ProconBypassMan::Procon::PerformanceMeasurement::SpanTransferBuffer
- Includes:
- Singleton
- Defined in:
- lib/procon_bypass_man/procon/performance_measurement/span_transfer_buffer.rb
Instance Method Summary collapse
-
#initialize ⇒ SpanTransferBuffer
constructor
A new instance of SpanTransferBuffer.
- #push_and_run_block_if_buffer_over(value, &block) ⇒ void
Constructor Details
#initialize ⇒ SpanTransferBuffer
Returns a new instance of SpanTransferBuffer.
4 5 6 |
# File 'lib/procon_bypass_man/procon/performance_measurement/span_transfer_buffer.rb', line 4 def initialize @buff = [] end |
Instance Method Details
#push_and_run_block_if_buffer_over(value, &block) ⇒ void
This method returns an undefined value.
10 11 12 13 14 15 16 |
# File 'lib/procon_bypass_man/procon/performance_measurement/span_transfer_buffer.rb', line 10 def push_and_run_block_if_buffer_over(value, &block) push(value) return unless buffer_over? block.call(spans) clear end |