Skip to content

Instantly share code, notes, and snippets.

@miketheman
Forked from sidgopalan/gist:6540952
Last active December 22, 2015 22:39

Revisions

  1. miketheman revised this gist Sep 12, 2013. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    require "statsd"

    # Create a stats instance.
    statsd = Statsd.new("localhost", 8125)

    # Increment a counter.
    (1...100).each { statsd.count("dev.ruby.dogstatsd", 1) }
    # Increment a counter for 5 minutes, 1 point per second
    (1...300).each { statsd.count("dev.mike.dogstatsd", 1) ; sleep 1 }
  2. @sidgopalan sidgopalan created this gist Sep 12, 2013.
    7 changes: 7 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    require "statsd"

    # Create a stats instance.
    statsd = Statsd.new("localhost", 8125)

    # Increment a counter.
    (1...100).each { statsd.count("dev.ruby.dogstatsd", 1) }