JSON report
vegaload run -out report.json writes a JSON summary of the run. vegaload compare, -baseline, vegaload diagnose and vegaload merge read this file.
All times are whole numbers of nanoseconds. Names end in _ns. A rate such as error_rate is a fraction: 0.02 is 2%.
Some sections appear only when they apply. This page was checked against real 0.9.0 files.
Top level
| Field | Meaning |
|---|---|
schema | vegaload.io/report/v2: the latency blocks carry histograms. Older reports have no schema and no histograms. compare and -baseline read both. merge reads only reports with histograms. |
merged_from | How many runs vegaload merge combined into this report. Present only in a merged report. |
executor | The load shape, such as fixed-vus. A merged report of different shapes lists them, separated by commas. |
started_at | When the run started, as a UTC timestamp. |
elapsed_ns | How long the run took. |
total | Number of requests. In a -protocol run a request is one iteration. In a scenario run it is one call the scenario made. |
failed | How many of them failed. |
error_rate | failed divided by total. |
latency | The latency summary of the requests. See below. |
failure_reasons | How many requests failed for each reason, most first. Present when a request failed. See below. |
errors | The failures by kind, with one sample message each, most first. Present when a request or a check failed. See below. |
ttfb | Time to first byte of the HTTP calls: from sending the request to the first byte of the answer. The same fields as latency. Present when the run made HTTP calls. |
bytes_sent, bytes_received | The bytes every protocol sent and received, added up. Present when there were any. |
vus_peak | The most VUs that were running at the same time. |
vus_max | The most VUs the load shape allowed, or vus_peak if that was higher. In a merged report both are added up, since each run was its own machine. |
iterations_started, iterations_completed | Iterations that started, and those that ended. A run that stops mid-iteration has fewer completed than started. Dropped iterations are in neither. |
iterations | A scenario run's iterations. Present only for a scenario run. See below. |
dropped_iterations | Arrivals that constant-arrival-rate or ramping-arrival-rate could not start because every VU was busy. They never ran, so they are in no other number. Present when there were any. |
warnings | Plain sentences about what makes the numbers less trustworthy, such as more than 1% of the planned iterations dropped, or a warning that starts with generator overloaded:. Present when there is one. |
interrupted | true when Ctrl-C or SIGTERM stopped the run before its planned end. The numbers cover only the time it ran, and no threshold or baseline was judged. A warning starting interrupted: says how long it ran. Present only when it is true. |
generator | How hard the machine running VegaLoad worked during the run. See below. |
time_series | The run, cut into slices over time. |
thresholds | Each threshold and its result. Present when you set thresholds. |
thresholds_passed | true if every threshold passed. |
baseline | The result of the baseline gate. Present with -baseline. |
steps | Results for each named step(). Present when the scenario uses steps. |
protocols | Results for each protocol the run used. |
checks | Pass and fail counts for each check. Present when the scenario uses checks. |
latency
The same fields appear in iterations.duration, steps, protocols, their operations and their measures.
| Field | Meaning |
|---|---|
min_ns, mean_ns, max_ns | Fastest, average and slowest call. These are exact. |
p50_ns, p90_ns, p95_ns, p99_ns | Percentiles. p95_ns means 95% of calls were this fast or faster. They are estimated from histogram, within 2.5% of the exact value for calls slower than 0.5 ms. With vegaload run -exact-percentiles they are exact. |
histogram | The latency histogram the percentiles come from. vegaload merge adds these up. See below. |
histogram
The buckets are the ones the Harness k6 load test runner uses. Bucket 0 holds calls of 0.5 ms or less. Bucket i holds calls slower than 0.5 ms × 1.05i-1 and up to 0.5 ms × 1.05i. Each bucket is 5% wider than the one before.
| Field | Meaning |
|---|---|
base_ms | 0.5, the top of bucket 0. |
growth | 1.05, how much wider each bucket is than the one before. |
count | How many calls the histogram holds. |
sum_ns | The exact total of their latencies. |
min_ns, max_ns | The exact fastest and slowest. |
counts | Calls per bucket, keyed by the bucket number as text, such as {"62": 18, "63": 40}. Empty buckets are left out. |
A percentile is the bucket's geometric middle (0.5 ms × 1.05i-0.5), kept between min_ns and max_ns. The fastest and slowest are min_ns and max_ns themselves. In bucket 0 the estimate is spread between min_ns and 0.5 ms.
generator
The load generator's own load. When it cannot keep up, it starts calls late and adds its own delay to the latency, so the numbers show its limits, not the target's.
| Field | Meaning |
|---|---|
cpus | The CPUs VegaLoad can use (GOMAXPROCS, which is the machine's CPU count unless you set it). |
cpu_avg_percent | The CPU the VegaLoad process used over the run, as a percentage of cpus. The python3 processes of a Python scenario are not in it. |
cpu_peak_percent | The most it used in one second. |
sched_latency_p99_ns | How long a goroutine waited to run, 99th percentile, over the run. |
sched_latency_peak_p99_ns | The highest one-second value of the same. |
overloaded | true when the run has the generator overloaded: warning: the CPU was at 90% or more for 3 seconds or more, goroutines waited 20 ms or more to run (p99) for 3 seconds or more, or more than 1% of the planned iterations were dropped. |
In a merged report each generator was its own machine, so generator holds the highest value of each field across the merged runs, and overloaded is true when any of them was.
failure_reasons[]
| Field | Meaning |
|---|---|
reason | timeout, status N (the status the answer had, such as status 503), connection refused, connection reset, dns, tls or error. |
count | How many requests failed for that reason. The counts add up to failed. |
errors[]
| Field | Meaning |
|---|---|
kind | status N, timeout, connection refused, dns, tls, check failed (a check that did not pass, which is not a failed request) or other. |
count | How many failures of this kind. Without check failed, the counts add up to failed. |
sample | The message of the first failure of this kind, on one line and at most 200 bytes. A password in a URL is masked and every -secret-env value is removed. For check failed it is the check's name. |
Each entry in a protocol's operations has its own errors too, without check failed.
iterations
An iteration is one run of the scenario's default function (or iteration() in Python), every call in it included.
| Field | Meaning |
|---|---|
total | How many iterations ran. |
failed | How many ended in an error the scenario threw. A failed status is not one: it fails the call, not the iteration. |
error_rate | failed divided by total. |
duration | How long a whole iteration took, with the same fields as latency. |
time_series[]
| Field | Meaning |
|---|---|
offset_ns | Where this slice starts, counted from the start of the run. |
requests | Calls in this slice. |
failed | Failed calls in this slice. |
rps | Calls per second in this slice. |
error_rate | Failure fraction in this slice. |
thresholds[]
| Field | Meaning |
|---|---|
name | The threshold as you wrote it. |
metric | The metric, such as p95. |
operator | The comparison, such as <. |
value | The limit, as text, such as 500ms. |
observed | What the run measured, as text. |
passed | true or false. |
step | The step the threshold is limited to. Present only for a step threshold. |
protocol | The protocol the threshold is limited to. Present only for a protocol threshold. |
baseline
| Field | Meaning |
|---|---|
path | The baseline file you gave. |
max_regression_percent | The slack you allowed. |
passed | true if no metric regressed beyond the slack. |
metrics[] | One entry for error_rate and one for latency.p95. Each has name, baseline, candidate, unit and regressed. |
notes[] | A plain sentence about the result. |
steps[]
| Field | Meaning |
|---|---|
name | The step name. |
total | How many times the step ran. |
failed | How many runs failed. |
error_rate | The failure fraction. |
latency | The latency summary. |
protocols[]
| Field | Meaning |
|---|---|
name | The protocol, such as http. |
total, failed, error_rate | Counts and failure fraction for this protocol. |
latency | The latency summary. |
bytes_sent, bytes_received | Bytes moved. |
bytes_per_second | Throughput. |
operations[] | One entry per kind of call, such as ftp roundtrip. Each has name, total, failed, error_rate, latency, bytes_sent, bytes_received, and errors when a call failed. For http, http1 and http2, each entry is one endpoint row: name is METHOD name, such as GET /users/{id}, and method and endpoint hold its two parts. There are at most 500 such rows. The calls past them are in one row named Other, which has no method or endpoint. |
measures[] | Phase times inside the protocol, such as ftp connect_time. Each has name, count and latency. Present when the protocol records them. For http, http1 and http2 this includes ttfb, the time to first byte. |
checks[]
| Field | Meaning |
|---|---|
name | The check name. |
passes | How many times it passed. |
fails | How many times it failed. |
Example
A short run with one step and one check, trimmed:
{
"schema": "vegaload.io/report/v2",
"executor": "fixed-vus",
"total": 224,
"failed": 0,
"error_rate": 0,
"latency": {
"min_ns": 14932404, "mean_ns": 27400874, "max_ns": 45250972,
"p50_ns": 26662316, "p95_ns": 37516557,
"histogram": { "base_ms": 0.5, "growth": 1.05, "count": 224,
"sum_ns": 6137795793, "min_ns": 14932404, "max_ns": 45250972,
"counts": { "70": 1, "71": 1, "73": 1, "74": 1, "75": 3, "76": 10,
"77": 10, "78": 12, "79": 24, "80": 20, "81": 21, "82": 17, "83": 25,
"84": 17, "85": 14, "86": 13, "87": 8, "88": 9, "89": 9, "90": 3,
"91": 1, "92": 2, "93": 2 } }
},
"thresholds": [
{ "name": "p95 < 500ms", "metric": "p95", "operator": "<",
"value": "500ms", "observed": "37.52ms", "passed": true }
],
"thresholds_passed": true,
"steps": [{ "name": "list", "total": 224, "failed": 0 }],
"checks": [{ "name": "status is 200", "passes": 224, "fails": 0 }]
}
To compare two reports, see Compare two runs. To explain one, see Explain a run. To combine reports from several machines, see Merge results.