Load Kit reference
This page lists exact facts. For how to use them, see the other pages of the Load Kit. The flags are the output of robotelos-load -h. That command exits with 2.
Flags
Scenario and load
| Flag | Default | Meaning |
|---|---|---|
-scenario | fanout | fanout, many, idle or reconnect. |
-followers | 10 | Connections that follow a conversation. For idle, the idle connections. For many, per conversation. |
-conversations | 10 | Conversations at once (many). |
-hold | 5s | How long the connections idle before the probe (idle). |
-before | 20 | Events every follower has before the storm (reconnect). |
-during | 20 | Events sent while all followers are gone (reconnect). |
-events | 200 | Events in the measured phase. |
-warmup | 20 | Events before it, sent and checked but not measured. |
-interval | 10ms | Time between two sends. |
-drain | 5s | How long to wait for the last event at every follower. |
-seed | 1 | Seed recorded in the result. |
-transport | pipe | pipe (in process), ws, grpc or sse. |
Target and server
| Flag | Default | Meaning |
|---|---|---|
-url | empty | Server to dial: a ws or sse URL, or a gRPC host:port. Empty starts a server in this process. The token is read from ROBOTELOS_LOAD_TOKEN. |
-target | empty | Name of a target of the target file. Flags override what it says. |
-targets | ROBOTELOS_STRESS_TARGETS, else ~/.robotelos/stress-targets.yaml | The target file. Needs -target. |
-environment | empty | The environment the target is expected to be, for the record and the baseline. |
-metrics-url | empty | Prometheus endpoint of the server at -url. The change over the run goes into the result. |
-pprof-url | empty | Diagnostics listener of the server at -url. Its profiles go to -pprof-dir. |
-pprof-dir | empty | Directory for the profiles of the server at -pprof-url. |
-pprof-seconds | 10 | Length of the server CPU profile. Set it to about the measured phase. At least 1. |
-grafana-url | empty | Grafana to annotate with the start and end of the run. Off when empty. The token is read from ROBOTELOS_GRAFANA_TOKEN. |
Output and objectives
| Flag | Default | Meaning |
|---|---|---|
-out | empty | Directory for run records and, for a suite, its results. The exit code is then that of the record. |
-bench | empty | Append the result as a Go benchmark line to this file, for benchstat. |
-slo-p99 | 0 | Fail the run when p99 latency exceeds this. 0 means none. |
-cpuprofile | empty | Write a CPU profile of the run to this file. |
-mutexprofile | empty | Write a mutex contention profile of the run to this file. |
-memprofile | empty | Write a heap profile at the end of the run to this file. |
Suites, judging and baselines
| Flag | Default | Meaning |
|---|---|---|
-suite | empty | baseline or smoke. Runs a fixed list of cases and writes its results to -out. |
-runs | 6 | Runs of each case of a suite. Only with -suite. Six is the least benchstat can give an interval for. |
-judge | false | Judge the run, or each case, by the queries of -stress-dir against its baseline. Needs -url, -out, a Grafana and an environment. |
-stress-dir | stress | Directory with queries.json and baselines/<env>/<suite>/<case>.json. Only with -judge or -accept-baseline. |
-accept-baseline | false | Accept the baselines of the stored runs below the directories after the flags. Takes no other flag but -stress-dir. Asks no server. |
Refusals, all exit 2:
-runswithout-suite.-outwith an empty value.-stress-dirwithout-judgeor-accept-baseline.-suitewithout-out, with-runsbelow 1, or with a flag the suite fixes:-scenario,-followers,-conversations,-hold,-before,-during,-events,-warmup,-interval,-bench,-slo-p99,-cpuprofile,-mutexprofile,-memprofile,-pprof-url,-pprof-dir,-pprof-seconds.-metrics-urlor-pprof-urlwithout-url.-pprof-urlwithout-pprof-dir.- An unknown scenario, suite or transport, or
-urlwith-transport pipe. - A token in plain text to a host that is not loopback.
- A token of fewer than 8 bytes with
-out. -judgewithout-url,-out, a Grafana or an environment, or without a readablequeries.json.
Environment variables
| Variable | Used for |
|---|---|
ROBOTELOS_LOAD_TOKEN | The bearer token of the server at -url, when the target names no other source. |
ROBOTELOS_GRAFANA_TOKEN | The service account token of the Grafana at -grafana-url, when the target names no other source. The local judged stack needs none. |
ROBOTELOS_STRESS_TARGETS | The path of the target file. |
The script scripts/judged-stack.ps1 also reads ROBOTELOS_POSTGRES_PORT, ROBOTELOS_GRAFANA_PORT, ROBOTELOS_OTLP_GRPC_PORT, ROBOTELOS_OTLP_HTTP_PORT, ROBOTELOS_JUDGED_HTTP_PORT and ROBOTELOS_JUDGED_GRPC_PORT. Its parameters are -Stop, -Project (default robotelos-judged), -Dir (default <temp>/robotelos-judged) and -StoreDelay.
Target file keys
The file has one top-level key, targets, a map from a target name to these keys. An unknown key is refused.
| Key | Meaning |
|---|---|
environment | A name usable as one path segment (letters, digits, ., _, -; at most 64 characters; no device names). |
url | Address without a user, query or fragment. |
token-env | The name of a variable (letters, digits, _). |
token-file | The path of a file with the token. ~/ is your home directory. |
disposable | true for a throwaway server. Refused for dev, stg and prod. |
grafana.url | Address of the Grafana, same rule as url. |
grafana.token-env, grafana.token-file | Token source of the Grafana. |
For each token, give token-env or token-file, not both.
Files
| Path | Content |
|---|---|
<out>/<run_id>/run.json | The run record. |
<out>/<run_id>/report.md | The report of the record. |
<out>/<run_id>/all.txt | Benchmark lines of the runs, and one BenchmarkStress/... line per measured metric. |
<out>/<run_id>/runs/<n>.json | The result of run n. |
<out>/<run_id>/runs/repeat<k>.<n>.json | A run made to confirm a slow timing. |
<out>/report.md, all.txt, environment.txt, runs/<case>.<n>.json | The files of a suite. |
<stress-dir>/queries.json | The fixed queries and the export interval. |
<stress-dir>/baselines/<env>/<suite>/<case>.json | A baseline. |
The run record
run.json has the schema robotelos.stressrun/1. Durations are in nanoseconds.
| Field | Meaning |
|---|---|
schema, run_id | The format and the run’s name. |
suite, case, scenario | The suite (the scenario for a single run), the case of a suite, and the scenario. |
window | Of a judged run: start, end, evaluate_at, range_ns. |
category, plane | load and data for robotelos-load. |
started_at, duration_ns | When it started and how long it took. |
git | commit and dirty. |
build | go_version, race, tags. |
environment | The generator machine: name, os, cpu, gomaxprocs, memory_bytes, postgres, pool_max_conns, transport, generator_shares_process. |
target | name, class (started for a server the tool started), stated_environment, expected_environment, effects_mode, control and conversation (addresses without a user), build, shared. |
runner | id, kind (robotelos-load), location. |
cleanup | done, leftovers, data_left_on_disposable. |
seed, params | The seed and the parameters of the scenario. |
load | scenario, params, warmup, runs, transport. A baseline is of one load. |
objectives | applied: the objectives of -slo-p99, each with metric, op, quantile and max_ns. |
metrics | One entry for the latency of the run: name, op, unit, count, p50 to p999, max, rate_per_s, outcomes (lost, duplicates, reordered, errors) and failures. |
queries | The query results of a judged run. See below. |
repetitions | The further runs of a case made to confirm a slow timing. Each has a window, metrics, generator, cancelled and error. |
generator | usable and max_schedule_lag_ns. |
cancelled, error | The run was stopped before its end, and why it could not be carried out. |
verdict, reasons, warnings | The verdict, why it is not PASS, and what does not change it. |
artifacts | The files of the run directory with their kind, path and SHA-256. |
The fields caps, series, faults, oracle and fuzz exist in the schema for other kinds of runs and are empty for robotelos-load.
A query result
Each entry of queries is one query for one label set.
| Field | Meaning |
|---|---|
query | The name in queries.json. |
hash | The hash of the query’s kind and expression. A baseline of another hash is not compared. |
series | The label set, empty for a series without labels. |
status | PASS, FAIL, NOT_APPLICABLE or NOT_JUDGED. |
value | The value of the run, or null for no data. |
baseline | median, min, max and n of the baseline. |
limit | The largest value the baseline allowed. Set whenever the value was compared. |
error, unreachable | Why the backend gave no answer. |
reason | What there is to tell a person: a regression, why it was not judged, or an improvement. |
confirmation | On a timing that was above its limit: values of the repetitions and the median. |
links | On a finding: explore and traces. |
A baseline file has environment, load and, per query name, hash, commit and series, each series with median, min, max and n.
Constants
| What | Value |
|---|---|
| Exit codes | 0 PASS, 1 FAIL, 2 bad arguments, 3 INCOMPLETE, 4 TECHNICAL_ERROR, 5 cancelled |
| Usable generator | At most 5 ms behind its schedule, and nothing lost, repeated, reordered or failed |
| Usable runs of a suite case | At least 3 |
| Runs of a baseline | At least 6, each a separate invocation |
| Minimum window of a judged run | 60 s |
Export interval in queries.json | 15 s |
| Time of a judged case | At least 105 s: 30 s quiet, 60 s window, 15 s quiet |
| Confirmations of a slow timing | 2 more runs of the whole case |
| Timing limit | baseline max x (1 + tolerance). The tolerance is 0.25 for the five queries in the repository. |
| Count limit | baseline max + (baseline max - baseline min) |
| Shortest token that can be redacted | 8 bytes |
Environments that cannot be disposable | dev, stg, prod |
| Smoke suite | fanout-followers-2, many-conversations-2, idle-connections-3, reconnect-followers-2 |
| Baseline suite | fanout-followers-1, -10, -100, -1000; many-conversations-10, -100; idle-connections-100, -1000; reconnect-followers-100, -1000 |
Next steps
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.