Package Exports
- api-bench-cli-mateus
- api-bench-cli-mateus/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (api-bench-cli-mateus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
API Benchmark CLI
A command-line tool for benchmarking APIs. This tool allows you to perform benchmarking tests on any API endpoint by sending multiple requests and analyzing the response times.
Installation
To install the package globally, run the following command:
npm install -g api-bench-cli-mateus
Usage
After installing the package, you can use it to benchmark an API. Here's an example of how to use it:
Example
api-bench-cli-mateus https://jsonplaceholder.typicode.com/posts GET -r 5 -d 200
Parameters:
- url (string): The URL of the API you want to benchmark.
- method (string): The HTTP method to use (GET, POST, etc.).
- requests (number): The number of requests to send.
- delay (number): The delay between requests in milliseconds.
Returns:
The function returns an object with the following statistics:
- avg (number): The average response time in milliseconds.
- min (number): The minimum response time in milliseconds.
- max (number): The maximum response time in milliseconds.
- p95 (number): The 95th percentile response time in milliseconds.
License
This project is licensed under the MIT License - see the LICENSE file for details.