For log collector's performance test
Write 100000000 logs at speed 100000 per seconds, this will ensure output 100000000 lines.
docker run -e MAX=100000000 -e SPEED=100000 \
-e DEBUG=true -e OUTPUT=/tmp/abc/def.log \
-v /host/path:/tmp liubin/loggenerator
Or write logs at speed 100000 per seconds and continue 600 seconds, this can NOT ensure output 600000000 lines.
docker run -e DURATION=600 -e SPEED=100000 \
-e DEBUG=true -e OUTPUT=/tmp/abc/def.log \
-v /host/path:/tmp liubin/loggenerator
MAX
: Total log size(linse) to writeSPEED
: Logs per second.DEBUG
: If set, will print process info(speed, used time ...).OUTPUT
: Log file full path(include log file name), if not provided, logs will be wrote tostdout
SIZE
: Size of one lineDURATION
: Write log continue time(seconds).MODE
:WEB
to use web api to controll, otherwise will be run as console cmd and use env as parameters.
DURATION
and MAX
must use one and can only use one.
Only needed when MODE=WEB
.