Created
July 8, 2019 08:55
-
-
Save skateinmars/950cef8aaf47e893489ba3a44b674c4e to your computer and use it in GitHub Desktop.
Fake Statsd ruby server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# vim: set ft=ruby | |
# | |
require 'rubygems' | |
require 'socket' | |
$stdout.sync = true | |
s = UDPSocket.new | |
s.bind(nil, 8125) | |
while blob = s.recvfrom(1024) | |
puts "StatsD Metric: #{blob.first}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment