Skip to content

Commit

Permalink
Add top-level run script
Browse files Browse the repository at this point in the history
  • Loading branch information
urso committed May 24, 2016
1 parent 882fc81 commit b9892de
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 21 deletions.
10 changes: 5 additions & 5 deletions env.sh
@@ -1,8 +1,8 @@
# make sure all child processes are killed
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
trap "pkill -P $$" SIGINT SIGTERM EXIT

# get testing home directory from finding absolute path of env.sh
DIR="$(dirname $0)"
DIR=$(dirname $0)
TEST_HOME=$(cd "$(dirname $BASH_SOURCE)"; pwd)

# test config variables
Expand All @@ -28,15 +28,15 @@ TEST_HOME=$(cd "$(dirname $BASH_SOURCE)"; pwd)

collect() {
if [ -f "$OUTCONFIG" ]; then
$COLLECTBEAT -c <(cat "$DIR/collect.yml" "$OUTCONFIG")
$COLLECTBEAT -c <(cat "$DIR/collect.yml" "$OUTCONFIG") &
else
$COLLECTBEAT -c <(cat $DIR/collect.yml <(echo "output.console:")) > $OUTDIR/stats.json
$COLLECTBEAT -c <(cat $DIR/collect.yml <(echo "output.console:")) > $OUTDIR/stats.json &
fi
}

watch() {
if $ENABLE_WATCH && [ -f "$EXPVAR_RATES" ]; then
python $EXPVAR_RATES $1/debug/vars
python $EXPVAR_RATES $1/debug/vars &
fi
}

Expand Down
2 changes: 1 addition & 1 deletion genbeat_logstash/compressed/collect.yml
Expand Up @@ -5,7 +5,7 @@ metricbeat.modules:
period: 1s
processes:
- generatorbeat
- tst-lj
- java

- module: beats
metricsets:
Expand Down
7 changes: 3 additions & 4 deletions genbeat_logstash/compressed/run.sh
Expand Up @@ -3,15 +3,14 @@
source $(dirname $0)/../../env.sh

## start logstash test server
$LOGSTASH -f logstash.conf >/dev/null 2>&1 &
$LOGSTASH -f $DIR/logstash.conf >/dev/null 2>&1 &

# start generatorbeat sending events to test server
$GENERATORBEAT -httpprof localhost:6060 -c $DIR/genbeat.yml &

watch http://localhost:6060 &
watch http://localhost:6060

# start metrics collection
sleep 5
collect &
collect

wait_shut $1
5 changes: 2 additions & 3 deletions genbeat_tstlj_es/run.sh
Expand Up @@ -8,9 +8,8 @@ $TST_LJ -es -bind localhost:9200 >/dev/null 2>&1 &
# start generatorbeat sending events to test server
$GENERATORBEAT -httpprof localhost:6060 -c $DIR/genbeat.yml &

watch http://localhost:6060 &
watch http://localhost:6060

# start metrics collection
collect &
collect

wait_shut $1
4 changes: 2 additions & 2 deletions genbeat_tstlj_v2/compressed/run.sh
Expand Up @@ -8,8 +8,8 @@ $TST_LJ -v2 -bind localhost:5044 >/dev/null 2>&1 &
# start generatorbeat sending events to test server
$GENERATORBEAT -httpprof localhost:6060 -c $DIR/genbeat.yml &

watch http://localhost:6060 &
watch http://localhost:6060

collect &
collect

wait_shut $1
4 changes: 2 additions & 2 deletions genbeat_tstlj_v2/compressed_pipelined/run.sh
Expand Up @@ -8,8 +8,8 @@ $TST_LJ -v2 -bind localhost:5044 >/dev/null 2>&1 &
# start generatorbeat sending events to test server
$GENERATORBEAT -httpprof localhost:6060 -c $DIR/genbeat.yml &

watch http://localhost:6060 &
watch http://localhost:6060

collect &
collect

wait_shut $1
4 changes: 2 additions & 2 deletions genbeat_tstlj_v2/uncompressed/run.sh
Expand Up @@ -8,8 +8,8 @@ $TST_LJ -v2 -bind localhost:5044 >/dev/null 2>&1 &
# start generatorbeat sending events to test server
$GENERATORBEAT -httpprof localhost:6060 -c $DIR/genbeat.yml &

watch http://localhost:6060 &
watch http://localhost:6060

collect &
collect

wait_shut $1
4 changes: 2 additions & 2 deletions genbeat_tstlj_v2/uncompressed_pipelined/run.sh
Expand Up @@ -8,8 +8,8 @@ $TST_LJ -v2 -bind localhost:5044 >/dev/null 2>&1 &
# start generatorbeat sending events to test server
$GENERATORBEAT -httpprof localhost:6060 -c $DIR/genbeat.yml &

watch http://localhost:6060 &
watch http://localhost:6060

collect &
collect

wait_shut $1
14 changes: 14 additions & 0 deletions run.sh
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT

export DURATION=240
export ENABLE_WATCH=false

while true; do
#./genbeat_logstash/compressed/run.sh
#./genbeat_logstash/uncompressed_pipelined/run.sh
./genbeat_tstlj_v2/compressed/run.sh
./genbeat_tstlj_v2/compressed_pipelined/run.sh
#./genbeat_tstlj_es/run.sh
done

0 comments on commit b9892de

Please sign in to comment.