Skip to main content
hitspec can export test execution metrics to external monitoring systems. This is especially useful for stress testing, where you want to track latency, error rates, and throughput over time.

Supported Formats

Metrics export is part of stress testing: it exports the summary of a --stress run. --metrics without --stress exports nothing and prints a warning on stderr (--metrics only applies with --stress); the run itself is unaffected.

Prometheus

Exposes metrics on an HTTP endpoint (default port 9090) for Prometheus to scrape.
Metrics are available at http://localhost:9090/metrics while the test runs, and are updated every second, so a scrape during the run sees the current totals. The JSON and DataDog exporters are written once, when the run ends. The endpoint is bound before the test starts. If the port is already in use, the command prints the error and exits 3 without sending any request.

DataDog

Sends metrics directly to the DataDog API.

JSON

Writes aggregate metrics to a file or stdout.

Multiple Exporters

Export to multiple formats simultaneously:

Exported Metrics

The metrics include:
Last modified on October 19, 2026