lib/datadog/statsd.rb
def batch
      @batch.open do
        yield self
      end
    end
# Send several metrics in the same UDP Packet
# They will be buffered and flushed when the block finishes
#
# @example Send several metrics in one packet:
#   $statsd.batch do |s|
#      s.gauge('users.online',156)
#      s.increment('page.views')
#    end
Send several metrics in the same UDP Packet
They will be buffered and flushed when the block finishes
Send several metrics in the same UDP Packet They will be buffered and flushed when the block finishes
def batch
      @batch.open do
        yield self
      end
    end
def batch @batch . open do yield self end end
Send several metrics in the same UDP Packet
They will be buffered and flushed when the block finishes
Send several metrics in the same UDP Packet They will be buffered and flushed when the block finishes
example
Send several metrics in one packet: $statsd.batch do |s| s.gauge('users.online',156) s.increment('page.views') end
Send several metrics in one packet : $statsd . batch do |s| s . gauge ( ' users . online ' 156 ) s . increment ( ' page . views ' ) end