8e4a09e9de
This is more generally useful than just load testing.
19 lines
310 B
Bash
Executable File
19 lines
310 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
JOBS=${1:-1}
|
|
DELAY=${2:-60}
|
|
|
|
BIN_DIR=$(cd $(dirname $0); pwd -P)
|
|
|
|
for i in $(seq $JOBS)
|
|
do
|
|
jobid=$(uuidgen | md5sum)
|
|
jobid=${jobid:1:8}
|
|
date
|
|
echo "Starting job $jobid, logging to /tmp/$jobid.log"
|
|
$BIN_DIR/test-job $jobid > /tmp/$jobid.log 2>&1 &
|
|
sleep $DELAY
|
|
done
|