
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
benchmark_unit
Machine-independent benchmark assertions for your unit tests.
== License
Copyright 2007 Cloudburst, LLC. See included LICENSE file.
The public certificate for this gem is at http://rubyforge.org/frs/download.php/25331/evan_weaver-original-public_cert.pem.
== Features
== Installation
sudo gem install benchmark_unit
== Usage
First, require the library. Then, in a regular Test::Unit::TestCase, call either assert_faster or assert_slower. Pass a number of RubySeconds and a block to benchmark.
require 'benchmark/unit'
class MyTest < Test::Unit::TestCase
def test_speed_of_critical_method
assert_faster(3) do
MyCriticalMethod("data")
end
end
end
You do not have to manually run the block multiple times; the library does that for you.
To find how many RubySeconds to start with, just omit the argument to the assert_faster or assert_slower call. The test will fail and report how long your block took. Add a little bit and use that as your initial failure point.
See Benchmark::RubySeconds for more details.
== Reporting problems
Patches and contributions are very welcome. Please note that contributors are required to assign copyright for their additions to Cloudburst, LLC.
FAQs
Unknown package
We found that benchmark_unit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.