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.
kaskade-benchmarking
Advanced tools
Kaskade is a server benchmarking tool that runs sequences of stateful, concurrent requests to a deployed or local server. Kaskade utilizes worker threads within Node.js to handle multithreading and create simulated concurrent server requests.
Simply install the npm module, create a config file using the format outlined in the Getting Started section, and import the kaskade-benchmarking module. Once your config file is set up, run the node command on your specified file and watch it go! Metrics tables of latency, byte throughput and requests/second are populated right in the command line.
Install the NPM module here, or by running npm i kaskade-benchmarking
in the command line.
To test your server with Kaskade, a configuration file must be setup. Within the project's root directory, create a .json file and define the parameters according to the criteria within the config object below:
// The following is an example benchmark config object that Kaskade will accept
// It comes with detailed comments to explain each field and if the field is required.
// For an actual JSON file, see the Example section within the Read.me
const config = {
// "servers" should contain a list of HTTP servers under test.
// REQUIRED, Must contain at least 1 server
servers: [
"localhost:3000",
],
// REQUIRED, "testDuration" is the duration of running benchmark test, in seconds.
testDuration: 600,
// REQUIRED, the number of concurrent users to access HTTP servers
concurrentUsers: 100,
// OPTIONAL, the target number of HTTP requests to send to servers per second
// if not set, the HTTP requests rate will be unlimited
targetThroughput: 1000,
// REQUIRED, a list of different types of sessions to run in this benchmark
sessions: [{
// a human readable name of this session
sessionName: "login and add to cart session",
// an ordered list of all the HTTP requests to issue in this session. REQUIRED: requestName, url, method, headers. OPTIONAL: body (dependent on request method)
requests: [
{
// a human readable name of this request
requestName: "load home page",
// the request url
url: "/",
// the HTTP request method
method: "GET",
// an object that contains all HTTP headers to send
headers: { 'Content-type': 'application/json' },
},
{
requestName: "login",
url: "/api/login",
method: "POST",
headers: { 'Content-type': 'application/json' },
// The HTTP request body, can be either a string or an object
// if it is an object, Kaskade will JSON.stringify before send the request
body: {
username: 'test1',
password: 'test1'
}
},
{
requestName: "add to card",
url: "/api/cart/addtocart",
method: 'POST',
headers: {
'Content-type': 'application/json'
},
body: {
listingId: 123,
qty: 2
},
},
]
}]
}
Below is a sample configuration file:
{
"servers": [
"localhost:3000"
],
"testDuration": 600,
"targetThroughput": 1000,
"numOfWorkers":4,
"sessions": [
{
"sessionName": "login and add to cart session",
"requests": [
{
"requestName": "load home page",
"url": "/",
"method": "GET",
"headers": {
"Content-type": "application/json"
}
},
{
"requestName": "add to card",
"url": "/api/cart/addtocart",
"method": "POST",
"headers": {
"Content-type": "application/json"
},
"body": {
"listingId": 123,
"qty": 2
}
}
]
}
]
}
[request a feature or report a bug]
Kaskade's goal is to expand our functionality, but we can't do it without you! One of the great benefits of open source projects, like Kaskade, is the ability for the community to actively contribute. Feel free to fork this project, make changes or fix bugs, and submit a pull request to the dev branch. Please limit scope of commits to address one feature or bug at a time.
To expediate the integration process, please copy the below PR example template and modify to reflect any changes to be considered for merging into the codebase.
# Summary
This pull request introduces adds units to the results table and pulls the session/request name into the latency table stat column.
## Related Issue
Missing units in table and lack of clarity.
## Type of Change
- [ ] Bug fix
- [x] New feature
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
## Testing Steps
1. Run console.log of printResults, which is commented out on bottom of printResults.js
## Checklist
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
Head over to Kaskade's splash page and LinkedIn for more details!
Checkout and clap our Medium article here for more details behind Kaskade!
Kaskade is MIT Licensed
FAQs
Kaskade -- a benchmarking tool.
The npm package kaskade-benchmarking receives a total of 0 weekly downloads. As such, kaskade-benchmarking popularity was classified as not popular.
We found that kaskade-benchmarking demonstrated a healthy version release cadence and project activity because the last version was released less than 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.