|
| 1 | +# Benchi example |
| 2 | + |
| 3 | +This folder includes an example of how to use Benchi. We use the following |
| 4 | +folder structure: |
| 5 | + |
| 6 | +- `infra`: Contains the Docker compose files for any infrastructure needed for |
| 7 | + the benchmarks. These are supposed to contain configurations that are common |
| 8 | + to all benchmarks. The specifics will be overridden by the benchmarks |
| 9 | + themselves. |
| 10 | +- `tools`: Contains the Docker compose files for the tools being benchmarked. |
| 11 | + Same as `infra`, these are supposed to contain configurations common to all |
| 12 | + benchmarks. |
| 13 | +- `bench-kafka-kafka`: Contains a specific benchmark configuration |
| 14 | + ([`bench.yml`](./bench-kafka-kafka/bench.yml)) for testing a kafka->kafka |
| 15 | + data pipeline. It also includes any overrides for the `infra` and `tools` |
| 16 | + configurations. |
| 17 | + |
| 18 | +You can run the example benchmark by running the following command: |
| 19 | + |
| 20 | +```sh |
| 21 | +benchi -config example/bench-kafka-kafka/bench.yml |
| 22 | +``` |
| 23 | + |
| 24 | +Running this benchmark will start a Kafka instance, create two test topics |
| 25 | +(`benchi-in` and `benchi-out`), produce test messages to one topic and then |
| 26 | +start a Conduit data pipeline configured to consume messages from the first |
| 27 | +topic and produce them to the second topic. The benchmark will run for 1 minute. |
| 28 | +While the benchmark is running, benchi will collect metrics from Kafka, Conduit |
| 29 | +and Docker, displaying them in the CLI. After the benchmark is complete, the |
| 30 | +metrics will be exported to CSV files in the output folder (e.g. |
| 31 | +`results/20060102_150405`). |
| 32 | + |
| 33 | +Benchi will store the results in the `results` folder. Inside the results folder, |
| 34 | +you will find a folder named after the current date and time (e.g. |
| 35 | +`results/20060102_150405`). This folder will contain logs and results: |
| 36 | + |
| 37 | +- `benchi.log`: Log file containing the output of the benchmark run. |
| 38 | +- `infra.log`: Log file containing the output of the infrastructure docker containers. |
| 39 | +- `tools.log`: Log file containing the output of the tools docker containers. |
| 40 | +- `conduit.csv`: Metrics collected using the [Conduit](../README.md#conduit) collector. |
| 41 | +- `docker.csv`: Metrics collected using the [Docker](../README.md##docker) collector. |
| 42 | +- `kafka.csv`: Metrics collected using the [Kafka](../README.md##kafka) collector. |
0 commit comments