0.0
The project is in a healthy, maintained state
Simple measurement of code execution time
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
 Project Readme

Time::Measure

Measure runtime.

Installation

Add this line to your application's Gemfile:

gem 'time-measure'

And then execute:

bundle install

Or install it yourself as:

gem install time-measure

Usage

To measure block execution time:

measure = Time::Measure.new { 'some_code' }
measure.result   # Block execution result.
measure.duration # Duration of block execution in seconds.

or

result, duration = Time.measure { 'some_code' }
result   # Block execution result.
duration # Duration of block execution in seconds.

Development and Testing

To start the interactive development console, use the command:

make console

To test the proper performance of the code, use rspec.

make rspec

To check the coding style, use rubocop.

make rubocop

To check the security of the code, use bundle-audit.

make audit

To check code coverage by tests, use simplecov. The result of her work can be viewed in coverage/index.html.

All checks are run with the following command:

make check

Contributing

Bug reports and pull requests are welcome on GitHub.

License

The gem is available as open source under the terms of the MIT License.