Skip to content

Commit e367fd9

Browse files
committed
tools: add openssl rand configurable logger
Signed-off-by: Wesley Pettit <[email protected]>
1 parent 8b4b140 commit e367fd9

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM amazonlinux
2+
ADD logger.sh /logger.sh
3+
RUN yum upgrade -y && yum install -y openssl
4+
RUN yum clean all \
5+
&& rm -rf /var/cache/yum
6+
CMD bash /logger.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# custom logger that outputs events to stdout
2+
# uses openssl to generate random data, so each log emitted
3+
# is unique
4+
#
5+
# Env Vars:
6+
# LOGGER_RATE => number of logs to emit per second
7+
# LOG_SIZE => size in bytes of openssl to generate for each log
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
# Writes 500 log lines per second
4+
5+
while :
6+
do
7+
for i in {0..${LOGGER_RATE}}
8+
do
9+
openssl rand -base64 ${LOG_SIZE}
10+
done
11+
sleep 1
12+
done

0 commit comments

Comments
 (0)