iconara / multimeter

JRuby application metric instrumentation using Dropwizard's Metrics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multimeter

JRuby application metric instrumentation using https://dropwizard.github.io/metrics.

Usage

You can create a metrics registry yourself, and create any metrics you want like this:

registry = Multimeter.create_registry
stuff = registry.counter('stuff')
timer = registry.timer('work')

stuff.inc
timer.time do
  # do some heavy work
end

Ruby blocks can also be used to define gauges – metrics that proxy things that are counted by other means:

gague = registy.gauge('requests_per_second') do
  some_object.requests_per_second
end

loop do
  puts gauge.value
  sleep 1
end

About

JRuby application metric instrumentation using Dropwizard's Metrics


Languages

Language:Ruby 57.5%Language:Java 42.5%