infinite_tracing/test/infinite_tracing/streaming_buffer_test.rb
# starts a watched thread that will generate segments asynchronously.
starts a watched thread that will generate segments asynchronously.
starts a watched thread that will generate segments asynchronously .
def prepare_to_stream_segments count, max_buffer_size=100_000
          buffer = StreamingBuffer.new max_buffer_size
          segments = []
          generator = watch_thread(:generator) do
            count.times do
              with_segment do |segment|
                segments << segment
                buffer << deferred_span(segment)
              end
            end
          end
          return generator, buffer, segments
        end
def prepare_to_stream_segments count , max_buffer_size = 100_000 buffer = StreamingBuffer . new max_buffer_size segments = [ ] generator = watch_thread ( :generator ) do count . times do with_segment do | segment | segments << segment buffer << deferred_span ( segment ) end end end return generator , buffer , segments end
starts a watched thread that will generate segments asynchronously.
starts a watched thread that will generate segments asynchronously .
# generates segments that are streamed as spans
count
<not_specific>
max_buffer_size
<not_specific>