etcd
etcd copied to clipboard
Add support to generate JSON report to the benchmark tool
This PR introduces the --json flag to the benchmark utility to produce JSON reports that are compatible with the perfdash format.
This will enable systematic performance tracking and visualization of etcd performance metrics over time, with the scope to integrate with CI while helping to identify regressions and analysis of performance trends over time.
Sample usage:
> benchmark put --json
...
2025/06/10 08:14:01 INFO: [core] [Channel #1]Channel Connectivity change to READY
10000 / 10000 [---------------------------------------------------------------------------------------------------------------------------] 100.00% 2062 p/s
Successfully created a JSON perf report at _artifacts/etcd_perf_2025-06-10T12:14:06Z.json
Summary:
Total: 5.0494 secs.
Slowest: 0.0036 secs.
Fastest: 0.0004 secs.
Average: 0.0005 secs.
Stddev: 0.0001 secs.
Requests/sec: 1980.4177
...
> cat _artifacts/etcd_perf_2025-06-10T12:14:06Z.json
{
"version": "v1",
"dataItems": [
{
"data": {
"Perc50": 0.4749,
"Perc90": 0.564,
"Perc99": 1.1201
},
"unit": "ms",
"labels": {
"Metric": "APIResponsiveness"
}
}
]
}