New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

benchmark-ipsa

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

benchmark-ipsa

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

benchmark-ipsa

Build Status Coverage Status

A iterations per second enhancement to Benchmark that includes memory allocations, based on benchmark-ips.

Installation

Add this line to your application's Gemfile:

gem 'benchmark-ipsa'

And then execute:

$ bundle

Or install it yourself as:

$ gem install benchmark-ipsa

Usage

require 'benchmark/ipsa'
Benchmark.ipsa do |x|
  x.report('foo 1'){
    arr = ['1', 2]
    sleep 0.1
  }
  x.report('foo 2'){
    sleep 0.1
  }
end

Results:

Allocations -------------------------------------
               foo 1       2/0  alloc/ret        1/0  strings/ret
               foo 2       0/0  alloc/ret        0/0  strings/ret
Warming up --------------------------------------
               foo 1     1.000  i/100ms
               foo 2     1.000  i/100ms
Calculating -------------------------------------
               foo 1      9.675  (± 0.0%) i/s -     49.000
               foo 2      9.585  (± 0.0%) i/s -     48.000

You can run the specs in this repo to see it live.

For more, see benchmark-ips

Development

Running the specs:

  • git clone
  • bundle install
  • bundle exec rake spec

Contributing

Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).

Copyright (c) 2016 Dotan Nahum @jondot. See LICENSE for further details.

FAQs

Package last updated on 25 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc