Socket
Book a DemoInstallSign in
Socket

whysoslow

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whysoslow

1.0.1
bundlerRubygems
Version published
Maintainers
2
Created
Source

Whysoslow

Description

Whysoslow is a little runner/printer we wrote to benchmark our Ruby code. It runs a block of code, collects run time measurements, and can snapshot memory usage information at various points during execution.

It has no tests, shockingly sparse docs, and is more of an experiment at this point. It comes as is for now so use if you see fit. I will happily accept any pull requests for documentation, tests, extensions, and improvements.

Usage

require 'whysoslow'

printer = Whysoslow::DefaultPrinter.new({
  :title => "Bench Report Title",
  :verbose => true
})

runner = Whysoslow::Runner.new(@printer)

runner.run do
  # ... some long running script or loop
  runner.snapshot("mem usage during run")
  # ... some more long running script or loop
end

Output: DefaultPrinter

The DefaultPrinter outputs to an io stream ($stdout by default). It uses Ansi to output columned memory usage snapshot data and measurement data.

Installation

Add this line to your application's Gemfile:

gem 'whysoslow'

And then execute:

$ bundle

Or install it yourself as:

$ gem install whysoslow

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 01 Mar 2015

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.