Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@mariocasciaro/benchpress
Advanced tools
No fuss benchmarking for Node.js.
var Benchpress = require('@mariocasciaro/benchpress');
var suite = new Benchpress({
// iterations: 1000 <--- 1000 by default
});
suite
.add('Benchmark name', {
beforeAll: function() {
// Run before the benchmark is started
},
beforeEach: function() {
// Run before each iteration
},
fn: function() {
// The code to profile
},
afterEach: function() {
// Run after each iteration
},
afterAll: function() {
// Run after the benchmark finishes
}
})
.add('Async benchmark', function() {
beforeAll: function(done) {
// Run code asynchronously before the benchmark starts
done();
},
fn: function(done) {
// Profile async code too
done();
},
afterEach: function(done) {
// any function can be asynchronous...
done();
},
//specify iterations per benchmark
iterations: 300
})
//don't forget to run the suite!!!
.run();
The code above will print in the console something like this:
Starting suite.
Benchmark 'Benchmark name': 374812 ops/sec (1000 iterations)
Benchpress 'Async benchmark': 126432 ops/sec (300 iterations)
Run complete.
FAQs
No fuss benchmarking
We found that @mariocasciaro/benchpress 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 supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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.