<commit_before># TinyProfiler

Very simple profiler - to be used with or without rails.

## Installation

Add this line to your application's Gemfile:

    gem 'tiny_profiler'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install tiny_profiler

## Usage

```ruby
require 'tiny_profiler'

TinyProfiler.instance.start

(do something)

TinyProfiler.instance.interval("heavy operation")

=> "heavy operation: 14.786334"

(do something)

TinyProfiler.instance.interval("second operation")

=> "second operation: 3.453059"

(do something)

TinyProfile.instance.finished

=> {"heavy operation"=>14.786334, "second operation"=>3.453059, "total"=>22.390635}
```

You can reset all timers using

    TinyProfiler.instance.reset
    
or

    Tinyprofiler.instance.start

It's singleton, so you can basically use it through your application when tracing some complicated operation.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
<commit_msg>readme fix<commit_after># TinyProfiler

Very simple profiler - to be used with or without rails.

## Installation

Add this line to your application's Gemfile:

    gem 'tiny_profiler'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install tiny_profiler

## Usage

```ruby
require 'tiny_profiler'
TinyProfiler.instance.start
(do something)
TinyProfiler.instance.interval("heavy operation")
=> "heavy operation: 14.786334"
(do something)
TinyProfiler.instance.interval("second operation")
=> "second operation: 3.453059"
(do something)
TinyProfile.instance.finished
=> {"heavy operation"=>14.786334, "second operation"=>3.453059, "total"=>22.390635}
```

You can reset all timers using

    TinyProfiler.instance.reset
    
or

    Tinyprofiler.instance.start

It's singleton, so you can basically use it through your application when tracing some complicated operation.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

{'fraction_non_alphanumeric': 0.10083296799649277, 'fraction_numerical': 0.03770276194651469, 'mean_word_length': 4.407582938388626, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3647028', 'n_tokens_mistral': 777, 'n_tokens_neox': 712, 'n_words': 247}