Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Latest commit

 

History

History
28 lines (19 loc) · 649 Bytes

File metadata and controls

28 lines (19 loc) · 649 Bytes

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