Reference
Every endpoint with its parameters, as /help lists them, with the defaults and limits of a server with no settings. The ones marked token need it when TOKEN is set. The page Endpoints says what each one does.
| Endpoint | Token | Command | What it does |
|---|---|---|---|
/ | Health check, returns “Status: OK” | ||
/stress | yes | stress | Runs a Fibonacci calculation in a worker, to keep a core busy |
/cpu | yes | cpu | Keeps the workers (or the first ones, with workers) busy for a share of the time, percent=0 stops it |
/delay | delay | Answers after a delay, without blocking the server | |
/status/:code | status | Answers with the given HTTP status | |
/flaky | flaky | Fails rate percent of the requests with code, and answers 200 to the rest | |
/memory | yes | memory | Allocates memory (MB) and holds it |
/leak | yes | leak | Memory that grows by itself, rate MB each second up to mb MB |
/disk | yes | disk | Writes a file (MB) in DISK_DIR and keeps it |
/fd | yes | fd | Opens file descriptors and holds them |
/connections | yes | connections | Opens TCP connections to the server itself and holds them |
/ready | Readiness check: 200, or 503 after /ready/off | ||
/ready/off | yes | ready | Makes /ready answer 503 for seconds (0 until /ready/on) |
/ready/on | yes | ready | Makes /ready answer 200 again |
/crash | yes | crash | Ends the process with the exit code, after the given seconds |
/block | yes | block | Freezes every thread of the server for ms, so it accepts and answers nothing |
/oom | yes | Allocates memory until the kernel kills the process, needs ALLOW_OOM=1 | |
/payload | yes | payload | GET answers with mb MB of data, streamed; POST takes an upload, discards it and reports its size and time |
/scenario | yes | scenario | POST a list of steps to run one after the other, GET shows where it is, DELETE stops it |
/log | yes | log | Writes lines to stdout at rate lines/s, then stops |
/echo | The request as the server sees it: headers, client address, protocol (credentials masked) | ||
/ui | Control panel in the browser | ||
/info | JSON with what the server is doing and the remaining budgets | ||
/metrics | The same figures in the Prometheus text format | ||
/help | This list | ||
/config | The effective configuration, without the token |
The root, /
Health check, returns “Status: OK”.
No parameters.
/stress
Runs a Fibonacci calculation in a worker, to keep a core busy.
Command: torchio stress [number], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
number | query | 45 | 0..50 |
/cpu
Keeps the workers (or the first ones, with workers) busy for a share of the time, percent=0 stops it.
Command: torchio cpu [percent] [hold] [workers], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
percent | query | 50 | 0..100 |
hold | query | 10 | 0..300 |
workers | query | 4 | 1..WORKERS |
/delay
Answers after a delay, without blocking the server.
Command: torchio delay [ms], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
ms | query | 1000 | 0..60000 |
/status/:code
Answers with the given HTTP status.
Command: torchio status <code>, see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
code | path | required | 200..599 |
/flaky
Fails rate percent of the requests with code, and answers 200 to the rest.
Command: torchio flaky [rate] [code] [ms], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
rate | query | 50 | 0..100 |
code | query | 503 | 400..599 |
ms | query | 0 | 0..60000 |
/memory
Allocates memory (MB) and holds it.
Command: torchio memory [mb] [hold], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
mb | query | 100 | 1..512 |
hold | query | 10 | 0..300 |
/leak
Memory that grows by itself, rate MB each second up to mb MB.
Command: torchio leak [rate] [mb] [hold], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
rate | query | 10 | 1..512 |
mb | query | 100 | 1..512 |
hold | query | 10 | 0..300 |
/disk
Writes a file (MB) in DISK_DIR and keeps it.
Command: torchio disk [mb] [hold], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
mb | query | 100 | 1..1024 |
hold | query | 10 | 0..300 |
/fd
Opens file descriptors and holds them.
Command: torchio fd [count] [hold], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
count | query | 100 | 1..10000 |
hold | query | 10 | 0..300 |
/connections
Opens TCP connections to the server itself and holds them.
Command: torchio connections [count] [hold], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
count | query | 10 | 1..500 |
hold | query | 10 | 0..300 |
/ready
Readiness check: 200, or 503 after /ready/off.
No parameters.
/ready/off
Makes /ready answer 503 for seconds (0 until /ready/on).
Command: torchio ready off [seconds], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
seconds | query | 30 | 0..300 |
/ready/on
Makes /ready answer 200 again.
Command: torchio ready on, see Starting a test.
No parameters.
/crash
Ends the process with the exit code, after the given seconds.
Command: torchio crash [code] [after], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
code | query | 1 | 0..255 |
after | query | 0 | 0..300 |
/block
Freezes every thread of the server for ms, so it accepts and answers nothing.
Command: torchio block [ms], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
ms | query | 5000 | 1..30000 |
/oom
Allocates memory until the kernel kills the process, needs ALLOW_OOM=1.
No parameters.
/payload
GET answers with mb MB of data, streamed; POST takes an upload, discards it and reports its size and time.
Command: torchio payload get [mb] | post <file|->, see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
mb | query | 10 | 1..1024 |
/scenario
POST a list of steps to run one after the other, GET shows where it is, DELETE stops it.
Command: torchio scenario <file|-> [--wait] | status | stop, see Starting a test.
No parameters.
/log
Writes lines to stdout at rate lines/s, then stops.
Command: torchio log [lines] [rate], see Starting a test.
| Parameter | In | Default | Range |
|---|---|---|---|
lines | query | 1000 | 1..100000 |
rate | query | 100 | 1..10000 |
/echo
The request as the server sees it: headers, client address, protocol (credentials masked).
No parameters.
/ui
Control panel in the browser.
No parameters.
/info
JSON with what the server is doing and the remaining budgets.
No parameters.
/metrics
The same figures in the Prometheus text format.
No parameters.
/help
This list.
No parameters.
/config
The effective configuration, without the token.
No parameters.