Sha256: d7c9811a3c16a1125f90154157c95829fbfb47ec37d2e42f22fda6688fe75ca2

Contents?: true

Size: 883 Bytes

Versions: 1

Compression:

Stored size: 883 Bytes

Contents

# Metrics

This is a primitive JRuby wrapper around [Coda Hale's Metrics library](https://github.com/codahale/metrics). It is very incomplete and still a work in progress. Feedback is appreciated.

# How to Use

Somewhere during the initialization of your app, you should set the name of your app. If you do not, it will default to "MyProject"

```ruby
MetricsJ.app_name = "Foo App"
```

You can view the metrics that your app is collecting by running `jconsole` from the command line. Select your JRuby app and navigate to the "MBeans" tab.

## Meters

```ruby
class Foo
  extend MetricsJ::Meter

  meter :bar

  def baz
    bar_meter.mark
    # Do something...
  end

end
```

# Todo

Most everything, still:

- Gauges
- Counters
- Histograms
- Timers
- Health Checks

In addition, there will be a Rails and a Sinatra/Padrino plugin that will hopefully hide most of these details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
metrics-java-0.0.1 README.md