
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
This gem allows you to benchmark the running time of methods in ruby.
Add this line to your application's Gemfile:
gem 'benchmarked'
And then execute:
$ bundle
Or install it yourself as:
$ gem install benchmarked
Create a notifier in your application
class BenchmarkedNotifier
def self.benchmark_taken(measurement, obj, method_name, args, result)
# Log measurement to your logging service
end
end
measurement
: The result of Benchmark.measure
obj
: The object that received the method_name
callmethod_name
: The name of the method executed on obj
args
: The arguments passed to the method invocationresult
: The return value of the method invocationConfigure Benchmarked
so that it uses the notifier. If you're using rails
, this would live in config/initializers/benchmarked.rb
Benchmarked.configure do |config|
config.notifier = BenchmarkedNotifier
end
Add handle_with_benchmark
after your method definitions so that every call to them triggers a call to benchmark_taken
on the notifier configured in Benchmarked
.
For example, let's say that you have this class:
class SomeBusinessClass
def business_method(arg1)
# perform business logic
end
handle_with_benchmark :business_method
end
Because handle_with_benchmark :business_method
is specified, a call like this:
SomeBusinessClass.new.business_method
Will trigger a call to BenchmarkedNotifier.benchmark_taken
Bug reports and pull requests are welcome on GitHub at https://github.com/bodyshopbidsdotcom/benchmarked-gem. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Benchmarked project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that benchmarked 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
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.