prombench is a tiny program that sends some load to a prometheus implementations in the form of promql.
prombench runs provided number of queries in the provided concurrency level and prints stats.
Usage: prombench [options...] <url> <query_file>
Options:
-c Number of workers to run concurrently. Total number of requests cannot
be smaller than the concurrency level. Default is 50.
-H Custom HTTP header. You can specify as many as needed by repeating the flag.
For example, -H "Accept: text/html" -H "Content-Type: application/xml" .
-cpus Number of used cpu cores.
(default for current machine is 12 cores)
To build,
make prombench
To run tests,
make test-unit
The following make target would setup promscale instance and ingests sample data to execute benchmark.
make run-benchmark
$ ./prombench "http://localhost:9201" "pkg/parser/testdata/obs-queries.csv"
Summary:
NumOfQueries: 11
TotalDuration: 215.426317ms
Min: 14.703164ms
Median: 18.428764ms
Average: 19.58421ms
Max: 26.788814ms
Status code distribution:
[200] 11 responses