Skip to content

CodingBoson/ApiBenchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ApiBenchmark

Benchmark API performance by sending custom HTTP requests defined in a JSON configuration.

Installation

Ensure Bun is installed. If it's not, install it with:

npm install -g bun

Clone the repository and install dependencies:

git clone https://github.com/CodingBoson/ApiBenchmark.git
cd ApiBenchmark
bun install

Usage

Run the benchmark with:

bun start ./examples/test.json 10

API Test Example

Below is an example configuration:

{
    "name": "My Benchmark",
    "host": "https://myhost.com",
    "path": "api/example",
    "request": {
        "method": "POST",
        "headers": {
            "Content-Type": "application/json"
        },
        "body": {
            "userId": 1
        }
    }
}

About

A simple Typescript tool for bench-marking apis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published