diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
commit | be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /fluent-bit/examples/perf_test/scripts/entrypoint.sh | |
parent | Initial commit. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fluent-bit/examples/perf_test/scripts/entrypoint.sh')
-rwxr-xr-x | fluent-bit/examples/perf_test/scripts/entrypoint.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/fluent-bit/examples/perf_test/scripts/entrypoint.sh b/fluent-bit/examples/perf_test/scripts/entrypoint.sh new file mode 100755 index 00000000..4b53d4c7 --- /dev/null +++ b/fluent-bit/examples/perf_test/scripts/entrypoint.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -eu + +LOG_DIR=${LOG_DIR:-/logs} +LOG_PREFIX=${LOG_PREFIX:-multi} +LOG_COUNT=${LOG_COUNT:-100} +LOG_RATE=${LOG_RATE:-20} +LOG_SIZE=${LOG_SIZE:-1000} +LINE_COUNT=${LINE_COUNT:-0} + +rm -vfr "${LOG_DIR:?}/$LOG_PREFIX*" + +for i in $(seq "$LOG_COUNT") +do + export OUTPUT_LOGFILE="$LOG_DIR/$LOG_PREFIX-$i.log" + if [[ "$LINE_COUNT" -gt 0 ]]; then + /scripts/multi-line-log-generator.sh & + else + echo "Creating $OUTPUT_LOGFILE" + # Far too much debug + /run_log_generator.py --log-size-in-bytes "$LOG_SIZE" --log-rate "$LOG_RATE" --log-agent-input-type tail --tail-file-path "$OUTPUT_LOGFILE" &> /dev/null & + fi +done + +wait |