-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun.sh
executable file
·54 lines (38 loc) · 1.11 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
set -eou pipefail
TARGET_ENV="${TARGET_ENV:-development}"
trap 'tear_down;kill $(jobs -p); exit 0' EXIT
tear_down() {
if [[ "$TARGET_ENV" = "development" ]]; then
echo -e "\nUndeploying dev manifests"
fi
}
scrape_cluster_logging_es_metrics() {
source .bingo/variables.env
(
$PROMETHEUS --log.level=warn --config.file=./config/prometheus/config.yaml --storage.tsdb.path="$(mktemp -d)";
) &
}
generate_report() {
source .bingo/variables.env
for f in $REPORT_DIR/*.gnuplot; do
gnuplot -e "set term png; set output '$f.png'" "$f"
done
cp ./reports/README.template $REPORT_DIR/README.md
sed -i "s/{{TARGET_ENV}}/$TARGET_ENV/i" $REPORT_DIR/README.md
$EMBEDMD -w $REPORT_DIR/README.md
}
bench() {
if [[ "$TARGET_ENV" = "development" ]]; then
echo "Deploying dev manifests"
fi
echo -e "\nScrape metrics from Loki deployments"
scrape_cluster_logging_es_metrics
source .bingo/variables.env
echo -e "\nRun benchmarks"
$GINKGO -v ./benchmarks
echo -e "\nGenerate benchmark report"
generate_report
}
bench
exit $?