#!/usr/bin/env bash # Regenerates every file under docs/output/. Each broker is started, measured and left running # only for its own group of tests, because three brokers do not fit comfortably in memory on a # small machine at the same time. # # Required environment: # KAFKA_HOME unpacked kafka_2.13-4.2.1 # ERL_ROOT an Erlang 24 installation (RabbitMQ 3.10.x) # RABBITMQ_HOME unpacked rabbitmq-server-generic-unix-3.10.25 # PULSAR_HOME unpacked apache-pulsar-4.2.4-bin set -euo pipefail cd "$(dirname "$0")/.." mkdir -p docs/output # Kafka needs no external broker for the measurements: spring-kafka-test starts a real KRaft # broker in-process. KAFKA_HOME is only used by the footprint measurement. mvn -B -Dgroups=kafka test 2>&1 | grep -E 'Running |Tests run:|BUILD ' > docs/output/tests.txt scripts/rabbit-broker.sh mvn -B -Dgroups=rabbit test 2>&1 | grep -E 'Running |Tests run:|BUILD ' >> docs/output/tests.txt scripts/pulsar-broker.sh mvn -B -Dgroups=pulsar test 2>&1 | grep -E 'Running |Tests run:|BUILD ' >> docs/output/tests.txt { echo "== Operational footprint, measured on one 2-core / 3.8 GB Linux box ==" echo echo "Each broker started from its shipped distribution with default configuration and a" echo "700 MB heap cap, on Temurin JDK 21. Times are one sample on a small box: treat them as" echo "orders of magnitude, not as a benchmark." echo scripts/footprint.sh kafka; echo scripts/footprint.sh rabbit; echo scripts/footprint.sh pulsar } > docs/output/footprint.txt echo "regenerated:"; ls -1 docs/output