Project

multimeter

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Multimeter provides a thin wrapper around Dropwizard's (a.k.a. Coda Hale's) Metrics library under the hood.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

< 4.0.0, ~> 3.1
 Project Readme

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