Skip to content
Real time API latency analyzer - Create a PDF report and HDR histogram of your APIs
Go Makefile
Branch: master
Clone or download

Latest commit

Latest commit 4451adf Mar 10, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
vendor
.gitignore Prepare for 0.1.0 release Mar 10, 2020
LICENSE Initial commit Feb 6, 2020
Makefile
README.md Initial code commit Feb 11, 2020
go.mod Initial code commit Feb 11, 2020
go.sum Prepare for 0.1.0 release Mar 10, 2020
rtapi.go

README.md

Real Time API (RTAPI) Latency Testing Tool

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 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 APIs

USAGE:
    rtapi [global options] command [command options] [arguments...]

VERSION:
    v0.0.1

COMMANDS:
    help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
    --file value, -f value    Select a JSON file to load
    --data value, -d value    Pass API parameters directly as a JSON string
    --output value, -o value  PDF report file name
    --help, -h                show help (default: false)
    --version, -v             print the version (default: false)

Sample 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": 10,
      "request_rate": 500
    }
  }
]

Default Query Values

The default query parameters closely follow the default query parameters found in wrk2.

"threads": 2
"max_threads": 2
"connections": 10
"duration": 10
"request_rate": 500
You can’t perform that action at this time.