Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
freeloader-bundle
Advanced tools
Collection of streams for freeloader. They're roughly divided into 3 categories:
Emitters
Stop conditions
Reporters
All these modules are Node.js Transform streams, so you can also easily create your own.
Emits count
requests for each incoming request.
Example:
emit(r)
.pipe(times(5))
.send()
Emits count
requests per second for each incoming request.
This emitter only stops when you press Ctrl-C
or when a downstream module requests a shutdown.
Example:
emit(r)
.pipe(perSecond(10))
.send()
Note: the emitter can push out thousands of requests per second, but you will most likely be limited by the local network bottlneck.
Maintains count
requests in flight for each incoming request.
This emitter only stops when you press Ctrl-C
or when a downstream module requests a shutdown.
This is the equivalent of threads
in JMeter.
Example:
emit(r)
.pipe(concurrent(50))
.send()
Applies the fn
function to every incoming request. For example, the function can add headers or modify the payload.
Example:
function randomId(req) {
req.body.myId = Math.floor(Math.random() * 1000);
}
emit(r)
.pipe(times(1000))
.pipe(transform(randomId))
.send()
Stop sending any more requests after duration
. This module needs to be downstream of any emitting module, since the pause
event bubbles up.
duration
is a human readable string like 5s
, 20s
, 3m
, 1h
.
Example:
emit(r)
.pipe(perSecond(5))
.pipe(stopTimer('10s'))
.send()
Note: this does not terminate the pipeline immediately. It simply asks upstream modules to stop sending requests. The shutdown can take a few seconds if modules are still waiting for responses to arrive (ex: consoleSummary
).
Shuts down the pipeline after count
requests have gone through. This module needs to be downstream of any emitting module, since the pause
event bubbles up.
duration
is a human readable string like 5s
, 20s
, 3m
, 1h
.
Example:
emit(r)
.pipe(perSecond(5))
.pipe(stopCount(30))
.send()
Note: this does not terminate the pipeline immediately. It simply asks upstream modules to stop sending requests. The shutdown can take a few seconds if modules are still waiting for responses to arrive (ex: consoleSummary
).
Prints every request and response as they arrive. This is useful for debugging, but usually too verbose for actual load tests.
Example:
emit(r)
.pipe(print())
.send()
Prints a dot for every request going through, as a way to track progress.
Example:
emit(r)
.pipe(requestDots())
.send()
For every response that comes back, prints a green 'o' (success) or a red 'x' (failure).
Example:
emit(r)
.pipe(responseDots())
.send()
Prints the state of the test to the console every millis
milliseconds. This includes total requests count, response count, and number of requests in flight.
Example:
emit(r)
.pipe(periodicSnapshot(1000))
.send()
Prints useful statistics to the console once all the responses have arrived, including the average response times.
Example:
emit(r)
.pipe(consoleSummary())
.send()
Similar to consoleSummary
, but prints the statistics to a file. This is useful to integrate into a CI pipeline.
Example:
emit(r)
.pipe(jsonSummary('test-report.json'))
.send()
Prints bar charts to the console once the test has finished (response time distribution, ...).
Example:
emit(r)
.pipe(consoleCharts())
.send()
Calls the fn
function once the test is finished. The function will be called with an Error
if any of the requests failed.
Example:
function done(err) {
console.log(err ? ('Test failed: ' + err) : 'Success');
}
emit(r)
.pipe(callback(done))
.send()
Promise-like API for when the test has finished. Will call fnSuccess
if all the requests were successful, and fnSuccess
if there were any errors.
Example:
function success() {
console.log('Success!');
}
function failure() {
console.log('Failure:', err);
}
emit(r)
.pipe(then(success, failure))
.send()
FAQs
Collecion of streams for freeloader
The npm package freeloader-bundle receives a total of 6 weekly downloads. As such, freeloader-bundle popularity was classified as not popular.
We found that freeloader-bundle 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.