New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

api-bench-cli-mateus

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-bench-cli-mateus

A simple tool for benchmarking APIs

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

api

FAQs

Package last updated on 01 Apr 2025

Did you know?

Socket

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.

Install

Related posts