Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Bench Press is a simple dsl around Ruby's Benchmark library.
Place the code you wish to benchmark inside of a measure block, run the bench_press command and you'll get a markdown report containing your system information and the realtime benchmark.
Additionally, benchmarks can be published to the
Ruby Benchmark via
bench_press --publish benchmark.rb
command.
Use the --new
flag to get started
$ bench_press --new benchmark
$ vi benchmark.rb
# foo.rb
require 'bench_press'
extend BenchPress
base_string = ""
measure "string append" do
base_string << "Hello World"
end
base_string = ""
measure "string +=" do
base_string += "Hello World"
end
$ bench_press foo.rb
Foo
===
Date: August 05, 2010
System Information
------------------
Operating System: Mac OS X 10.6.4 (10F569)
CPU: Intel Core 2 Duo 2.4 GHz
Processor Count: 2
Memory: 4 GB
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin10.2.0], MBARI 0x6770, Ruby Enterprise Edition 2010.01
"string append" is up to 71% faster over 1000 repetitions
---------------------------------------------------------
string append 0.00270986557006836 secs Fastest
string += 0.00948691368103027 secs 71% Slower
The default number of repetitions is 1000 meaning each measure block is run 1000 times.
Each measure block is run in a forked subprocess in an attempt to isolate the memory usage per measurement. As of 0.3.0, the benchmark is run twice, the first run gets thrown away while the second run is added to the report.
I use rubygems but this library is $LOAD_PATH friendly which means we need to set up our own load path when playing locally.
Try sourcing the .dev file
$ source .dev
Copyright (c) 2009 Sandro Turriate. See LICENSE for details.
FAQs
Unknown package
We found that bench_press 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.