Skip to content

Commit 6106eda

Browse files
committed
simplify example, document it
1 parent 6c8cfa9 commit 6106eda

File tree

7 files changed

+59
-125
lines changed

7 files changed

+59
-125
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,35 @@ curl https://raw.githubusercontent.com/ConduitIO/benchi/main/install.sh | sh
4040

4141
### Running Benchmarks
4242

43-
To run the example benchmark, use the following command:
43+
The repository includes an [example benchmark](./example). Use the following
44+
command to run the benchmark:
4445

4546
```sh
4647
benchi -config ./example/bench-kafka-kafka/bench.yaml
4748
```
4849

50+
Running the benchmark will store the results in the `results` folder. Inside the
51+
results folder, you will find a folder named after the current date and time
52+
(e.g. `results/20060102_150405`). This folder will contain logs and results:
53+
54+
- `benchi.log`: Log file containing the output of the benchmark run.
55+
- `infra.log`: Log file containing the output of the infrastructure docker containers.
56+
- `tools.log`: Log file containing the output of the tools docker containers.
57+
- `conduit.csv`: Metrics collected using the [Conduit](#conduit) collector.
58+
- `docker.csv`: Metrics collected using the [Docker](#docker) collector.
59+
- `kafka.csv`: Metrics collected using the [Kafka](#kafka) collector.
60+
61+
For details about the example benchmark, see the
62+
[example README](./example/README.md).
63+
4964
### Command-Line Flags
5065

5166
- `-config`: Path to the benchmark config file (required).
5267
- `-out`: Path to the output folder (default: `./results/${now}`*).
5368
- `-tool`: Filter tool to be tested (can be provided multiple times).
5469
- `-tests`: Filter test to run (can be provided multiple times).
5570

56-
\* `${now}` is replaced with the current time formatted as `YYYYMMDDHHMMSS`.
71+
\* `${now}` is replaced with the current time formatted as `YYYYMMDD_HHMMSS`.
5772

5873
### Docker network
5974

example/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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.

example/bench-kafka-kafka/bench.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ infrastructure:
33
compose: ../infra/compose-kafka.yml
44

55
tools:
6-
kafka-connect:
7-
compose: ../tools/compose-kafka-connect.yml
86
conduit:
97
compose: ../tools/compose-conduit.yml
108

@@ -26,8 +24,6 @@ metrics:
2624
- "benchi-out"
2725
docker:
2826
collector: docker
29-
tools:
30-
- conduit
3127
settings:
3228
containers:
3329
- "benchi-kafka"

example/infra/compose-mongo.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

example/infra/compose-postgres.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

example/infra/postgres/conf.d/postgresql.conf

Lines changed: 0 additions & 8 deletions
This file was deleted.

example/tools/compose-kafka-connect.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)