<commit_before># Metriks Client

This is an experiment in making a threadsafe, low impact library to measure
aspects of your ruby.


# Installing

Everything is still in flux, so for the time being I have been installing
the gem from git with bundler.

To install, add this to your `Gemfile`:

    gem 'metriks', :git => 'git://github.com/eric/metriks.git'


# Metric Overview

## Counters

Basic atomic counter. Used as an underlying metric for many of the other
more advanced metrics.


### increment(incr = 1)

Increment the counter. Without an argument it will increment by `1`.

``` ruby
  counter = Metriks.counter('calls')
  counter.increment
```

### decrement(decr = 1)

Decrement the counter. Without an argument it will decrement by `1`.

``` ruby
  counter = Metriks.counter('calls')
  counter.decrement
```

#### count()<commit_msg>Metric Overview -> Metric API Overview<commit_after># Metriks Client

This is an experiment in making a threadsafe, low impact library to measure
aspects of your ruby.


# Installing

Everything is still in flux, so for the time being I have been installing
the gem from git with bundler.

To install, add this to your `Gemfile`:

    gem 'metriks', :git => 'git://github.com/eric/metriks.git'


# Metric API Overview

## Counters

Basic atomic counter. Used as an underlying metric for many of the other
more advanced metrics.


### increment(incr = 1)

Increment the counter. Without an argument it will increment by `1`.

``` ruby
  counter = Metriks.counter('calls')
  counter.increment
```

### decrement(decr = 1)

Decrement the counter. Without an argument it will decrement by `1`.

``` ruby
  counter = Metriks.counter('calls')
  counter.decrement
```

#### count()
{'fraction_non_alphanumeric': 0.10005817335660268, 'fraction_numerical': 0.004653868528214078, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1232522', 'n_tokens_mistral': 548, 'n_tokens_neox': 513, 'n_words': 216}