A tool for measuring the coverage of Bluesky/ATProto relays

connect to jetstream sources

+8 -4
+8 -4
run_test.rb
··· 8 9 config = YAML.load(File.read(SOURCES)) 10 11 - relays = config['relays'] 12 duration = config['duration']&.to_i || 60 * 15 13 - maxlen = relays.map(&:length).max 14 verbose = false 15 16 def print_help ··· 34 Worker = Struct.new(:host, :pid, :pipe) 35 workers = [] 36 37 - relays.each do |host| 38 input, output = IO.pipe 39 40 pid = fork do 41 input.close 42 - sky = Skyfall::Firehose.new(host) 43 44 events = 0 45 users = Set.new
··· 8 9 config = YAML.load(File.read(SOURCES)) 10 11 + relays = config['relays'] || [] 12 + jetstreams = config['jetstreams'] || [] 13 duration = config['duration']&.to_i || 60 * 15 14 + 15 + maxlen = (relays + jetstreams).map(&:length).max 16 verbose = false 17 18 def print_help ··· 36 Worker = Struct.new(:host, :pid, :pipe) 37 workers = [] 38 39 + sources = relays.map { |h| [:firehose, h] } + jetstreams.map { |h| [:jetstream, h] } 40 + 41 + sources.each do |type, host| 42 input, output = IO.pipe 43 44 pid = fork do 45 input.close 46 + sky = (type == :firehose) ? Skyfall::Firehose.new(host) : Skyfall::Jetstream.new(host) 47 48 events = 0 49 users = Set.new