Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nginxinc/rtapi
Real time API latency analyzer - Create a PDF report and HDR histogram of your APIs
https://github.com/nginxinc/rtapi
api latency nginx real-time
Last synced: 4 months ago
JSON representation
Real time API latency analyzer - Create a PDF report and HDR histogram of your APIs
- Host: GitHub
- URL: https://github.com/nginxinc/rtapi
- Owner: nginxinc
- License: apache-2.0
- Archived: true
- Created: 2020-02-06T14:19:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-24T18:42:32.000Z (over 1 year ago)
- Last Synced: 2024-06-18T22:53:24.618Z (7 months ago)
- Topics: api, latency, nginx, real-time
- Language: Go
- Homepage:
- Size: 7.9 MB
- Stars: 133
- Watchers: 13
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Project Status: Abandoned – Initial development has started, but there has not yet been a stable, usable release; the project has been abandoned and the author(s) do not intend on continuing development.](https://www.repostatus.org/badges/latest/abandoned.svg)](https://www.repostatus.org/#abandoned)
# Real Time API (RTAPI) Latency Testing Tool
# This repository has been archived. There will likely be no further development on the project and security vulnerabilities may be unaddressed.
This tool measures the latency response of a series of API endpoints and creates a PDF report with an HDR histogram of all API endpoints.
## How to use
`rtapi` takes either a JSON/YAML file or a JSON string containing endpoint data and query parameters (optional), queries each endpoint using the query parameters (or default query values if no parameters have been specified), and outputs a PDF report containing all the endpoint query results plotted in an HDR histogram.
```
$ ./rtapi -h
NAME:
Real time API latency analyzer - Create a PDF report and HDR histogram of Your APIsUSAGE:
rtapi [global options] command [command options] [arguments...]VERSION:
v0.2.0COMMANDS:
help, h Shows a list of commands or help for one commandGLOBAL OPTIONS:
--file value, -f value select a JSON or YAML file to load
--data value, -d value input API parameters directly as a JSON string
--output value, -o value output query results in easy to grasp PDF report
--print, -p output technical query results to terminal (default: false)
--help, -h show help (default: false)
--version, -v print the version (default: false)
```## Sample Input
### JSON
```json
[
{
"target": {
"url": "https://www.example.com",
"method": "POST",
"body": "{\"id\":\"0\"}",
"header": {
"Content-Type": [
"application/json"
]
}
},
"query_parameters": {
"threads": 2,
"max_threads": 2,
"connections": 12,
"duration": "10s",
"request_rate": 500
}
}
]
```### YAML
```yaml
- target:
url: https://www.example.com
method: POST
body: '{"id":"0"}'
header:
Content-Type:
- application/json
query_parameters:
threads: 2
max_threads: 2
connections: 12
duration: 10s
request_rate: 500
```### Default Values
Only the `target.url` parameter is required. If no method is specified the default is "GET", while in the case of the body and headers these will simply remain empty during the benchmark.
The default `query_parameters` closely follow the default query parameters found in [`wrk2`](https://github.com/giltene/wrk2).
```
threads: 2
max_threads: 2
connections: 10
duration: 10s
request_rate: 500
```