Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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.

EndpointTokenCommandWhat it does
/Health check, returns “Status: OK”
/stressyesstressRuns a Fibonacci calculation in a worker, to keep a core busy
/cpuyescpuKeeps the workers (or the first ones, with workers) busy for a share of the time, percent=0 stops it
/delaydelayAnswers after a delay, without blocking the server
/status/:codestatusAnswers with the given HTTP status
/flakyflakyFails rate percent of the requests with code, and answers 200 to the rest
/memoryyesmemoryAllocates memory (MB) and holds it
/leakyesleakMemory that grows by itself, rate MB each second up to mb MB
/diskyesdiskWrites a file (MB) in DISK_DIR and keeps it
/fdyesfdOpens file descriptors and holds them
/connectionsyesconnectionsOpens TCP connections to the server itself and holds them
/readyReadiness check: 200, or 503 after /ready/off
/ready/offyesreadyMakes /ready answer 503 for seconds (0 until /ready/on)
/ready/onyesreadyMakes /ready answer 200 again
/crashyescrashEnds the process with the exit code, after the given seconds
/blockyesblockFreezes every thread of the server for ms, so it accepts and answers nothing
/oomyesAllocates memory until the kernel kills the process, needs ALLOW_OOM=1
/payloadyespayloadGET answers with mb MB of data, streamed; POST takes an upload, discards it and reports its size and time
/scenarioyesscenarioPOST a list of steps to run one after the other, GET shows where it is, DELETE stops it
/logyeslogWrites lines to stdout at rate lines/s, then stops
/echoThe request as the server sees it: headers, client address, protocol (credentials masked)
/uiControl panel in the browser
/infoJSON with what the server is doing and the remaining budgets
/metricsThe same figures in the Prometheus text format
/helpThis list
/configThe 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.

ParameterInDefaultRange
numberquery450..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.

ParameterInDefaultRange
percentquery500..100
holdquery100..300
workersquery41..WORKERS

/delay

Answers after a delay, without blocking the server.

Command: torchio delay [ms], see Starting a test.

ParameterInDefaultRange
msquery10000..60000

/status/:code

Answers with the given HTTP status.

Command: torchio status <code>, see Starting a test.

ParameterInDefaultRange
codepathrequired200..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.

ParameterInDefaultRange
ratequery500..100
codequery503400..599
msquery00..60000

/memory

Allocates memory (MB) and holds it.

Command: torchio memory [mb] [hold], see Starting a test.

ParameterInDefaultRange
mbquery1001..512
holdquery100..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.

ParameterInDefaultRange
ratequery101..512
mbquery1001..512
holdquery100..300

/disk

Writes a file (MB) in DISK_DIR and keeps it.

Command: torchio disk [mb] [hold], see Starting a test.

ParameterInDefaultRange
mbquery1001..1024
holdquery100..300

/fd

Opens file descriptors and holds them.

Command: torchio fd [count] [hold], see Starting a test.

ParameterInDefaultRange
countquery1001..10000
holdquery100..300

/connections

Opens TCP connections to the server itself and holds them.

Command: torchio connections [count] [hold], see Starting a test.

ParameterInDefaultRange
countquery101..500
holdquery100..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.

ParameterInDefaultRange
secondsquery300..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.

ParameterInDefaultRange
codequery10..255
afterquery00..300

/block

Freezes every thread of the server for ms, so it accepts and answers nothing.

Command: torchio block [ms], see Starting a test.

ParameterInDefaultRange
msquery50001..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.

ParameterInDefaultRange
mbquery101..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.

ParameterInDefaultRange
linesquery10001..100000
ratequery1001..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.