makiwara
v2.1.9
Published
π¨ Benchmark URL to gain HTTP requests limits
Downloads
265
Maintainers
Readme
makiwara
π¨ Benchmark URL to gain HTTP requests limits
Install
npm install -g makiwara
Usage
const { attack } = require('makiwara');
attack('https://example.org', [1, 5, 10], 'sequence')
.then((result) => {
console.log(result);
})
.catch((err) => {
console.log(err);
});
CLI
makiwara --help
Usage: cli [options]
Example:
makiwara -u https://localhost:3000 -t 10 -s sequence
Options:
-V, --version output the version number
-u, --url <url> Define URL to attack. Ex. https://example.org/
-t, --timelimit [numbers] Define list of time thresholds (in seconds). Ex. 10,100,1000
-s, --strategy <concurrent|sequence> Define strategy for making requests
-h, --help output usage information
Example
makiwara -u https://example.org -t 1,5 -s sequence
Result:
ββββββββββββββββββββββββββ€βββββββββββββββββββββββββββββββββ
β HTTP Status Code β Requests quantity β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ’
β 200 OK β 3 β
ββββββββββββββββββββββββββ§βββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββ€βββββββββββββββββββββββββββββββββ
β Type β Sequence β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ’
β Effective Duration β 1.456 seconds β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ’
β Times β 3 β
ββββββββββββββββββββββββββ§βββββββββββββββββββββββββββββββββ
----------------------------------------------------
ββββββββββββββββββββββββββ€βββββββββββββββββββββββββββββββββ
β HTTP Status Code β Requests quantity β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ’
β 200 OK β 10 β
ββββββββββββββββββββββββββ§βββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββ€βββββββββββββββββββββββββββββββββ
β Type β Sequence β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ’
β Effective Duration β 5.399 seconds β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ’
β Times β 10 β
ββββββββββββββββββββββββββ§βββββββββββββββββββββββββββββββββ
Unit tests
npm test
Code coverage
npm run coverage
License
The MIT License @ 2017-2019