xref: /cloud-hypervisor/docs/performance_metrics.md (revision 7d7bfb2034001d4cb15df2ddc56d2d350c8da30f)
1# Performance Metrics
2
3Cloud Hypervisor provides a [performance metrics](https://github.com/cloud-hypervisor/cloud-hypervisor/tree/main/performance-metrics)
4binary for users to generate metrics data from their own
5environment. This document describes how to generate metrics data
6quickly by using Cloud Hypervisor's development script,
7e.g. `dev_cli.sh`. The only prerequisite is [Docker installation](https://docs.docker.com/engine/install/).
8Please note that upon its first invocation, this script will pull a
9fairly large container image.
10
11To generate metrics data for all available performance tests (including
12boot time, block I/O throughput, and network throughput & latency) and
13output the result into a json file:
14
15```
16$ ./scripts/dev_cli.sh tests --metrics -- -- --report-file /tmp/metrics.json
17```
18
19To get a list of available performance tests:
20
21```
22$ ./scripts/dev_cli.sh tests --metrics -- -- --list-tests
23```
24
25To generate metrics data for selected performance tests, e.g. boot time only:
26
27```
28$ ./scripts/dev_cli.sh tests --metrics -- -- --report-file /tmp/metrics.json --test-filter boot_time
29```
30