Socket
Book a DemoInstallSign in
Socket

reddavis-benchmarker

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reddavis-benchmarker

0.0.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

= Benchmarker

This is a very 0.0.1 attempt at building a benchmarking version of autotest.

While trying to make your code faster it can be a big pain and time waste having to keep switching to your benchmarks and then back again to your code.

It only works on OSX at the moment (because of fsevents).

== How To Use

Setup - your_file.rb require 'rubygems' require 'benchmarker' require 'benchmark' # rubys benchmark

Benchmarker.go('path to your code') do n = 2

Benchmark.bm do |x|
  x.report { for i in 1..n; a = "1"; end }
  x.report { n.times do   ; a = "1"; end }
  x.report { 1.upto(n) do ; a = "1"; end }
end

end

Start It ruby your_file.rb

Watch It Last Time: ["0.000015", "0.000010", "0.000010"] Now : ["0.000017", "0.000010", "0.000010"] Change : ["-13%", "0%", "0%"]

== Copyright

Copyright (c) 2009 reddavis. See LICENSE for details.

FAQs

Package last updated on 10 Aug 2014

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.