Sha256: b630e098e1aae3e61230d75487379843ac722e0c63c25116e93b3c73a4a3ce58
Contents?: true
Size: 470 Bytes
Versions: 29
Compression:
Stored size: 470 Bytes
Contents
module Ring class SQA class Receiver < Poller def run udp = udp_socket udp.bind address, port+1 loop { receive udp } end private def initialize database @db = database run end def receive udp data, _ = udp.recvfrom MAX_READ timestamp, row_id = data.split(/\s+/) latency = (Time.now.utc.to_f - timestamp.to_f)*1_000_000 @db.update row_id.to_i, 'ok', latency.to_i end end end end
Version data entries
29 entries across 29 versions & 1 rubygems