Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fake Statsd ruby server
#!/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