module RabbotMetaFlood
RabbotMetaFlood — tiered inter-line delay for !rabbot build output. Public: chunk_delay_sec_for Depends: FloodSafe Tests: test/lib/rabbot_meta_flood_test.rb
Constants
- FAST_DELAY_SEC
- FAST_LINE_MAX
- INSTANT_LINES
- MEDIUM_DELAY_SEC
- MEDIUM_LINE_MAX
Public Instance Methods
Source
# File lib/rabbot_meta_flood.rb, line 19 def chunk_delay_sec_for(logical_lines:) count = logical_lines.to_i return FAST_DELAY_SEC if count <= FAST_LINE_MAX return MEDIUM_DELAY_SEC if count <= MEDIUM_LINE_MAX FloodSafe::CHUNK_DELAY_SEC end
Source
# File lib/rabbot_meta_flood.rb, line 28 def piece_delay_sec(piece_index:, chunk_delay_sec:) index = piece_index.to_i return 0.0 if index < INSTANT_LINES chunk_delay_sec.to_f * (index - INSTANT_LINES + 1) end
First INSTANT_LINES pieces send immediately; remaining pieces use tiered spacing.