From e78e20d3bd535b5ad0de977ef3be63fa1d8d0a57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Henning?= <post@soeren-henning.de>
Date: Thu, 28 May 2020 15:59:11 +0200
Subject: [PATCH] Clean up execution

---
 execution/.gitignore              |  1 +
 execution/execution.sh            | 23 -----------------------
 execution/execution_tmp_200507.sh | 17 -----------------
 execution/exp_counter.txt         |  2 +-
 execution/run_loop.sh             |  2 +-
 5 files changed, 3 insertions(+), 42 deletions(-)
 create mode 100644 execution/.gitignore
 delete mode 100755 execution/execution.sh
 delete mode 100644 execution/execution_tmp_200507.sh

diff --git a/execution/.gitignore b/execution/.gitignore
new file mode 100644
index 000000000..d4dceff02
--- /dev/null
+++ b/execution/.gitignore
@@ -0,0 +1 @@
+exp_counter.txt
\ No newline at end of file
diff --git a/execution/execution.sh b/execution/execution.sh
deleted file mode 100755
index 0a1ead950..000000000
--- a/execution/execution.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-./run_loop.sh 1 "25000 50000 75000 100000 125000 150000" "1 2 3 4 5" 40 #6*5=3Std
-sleep 5m
-./run_loop.sh 2 "6 7 8 9" "1 2 3 4 6 8 10 12 14 16 18 20" 40 #4*12=5Std
-sleep 5m
-./run_loop.sh 3 "25000 50000 75000 100000 125000 150000" "1 2 3 4 5 6" 40 #6*6=3.5Std
-sleep 5m
-./run_loop.sh 4 "25000 50000 75000 100000 125000 150000" "1 2 4 6 8 10 12 14 16 18 20 30 40 50 60 70 80 90" 40 #6*18=11Std
-sleep 5m
-
-./run_loop.sh 1 "25000 50000 75000 100000 125000 150000" "1 2 3 4 5" 400 #6*5=3Std
-sleep 5m
-./run_loop.sh 2 "6 7 8 9" "1 2 3 4 6 8 10 12 14 16 18 20" 400 #4*12=5Std
-sleep 5m
-./run_loop.sh 3 "25000 50000 75000 100000 125000 150000" "1 2 3 4 5 6" 400 #6*6=3.5Std
-sleep 5m
-./run_loop.sh 4 "25000 50000 75000 100000 125000 150000" "1 2 4 6 8 10 12 14 16 18 20 30 40 50 60 70 80 90" 400 #6*18=11Std
-sleep 5m
-./run_loop.sh 4 "150000" "100 110 120 130 140 150 160 17 18 190 200" 400 #6*18=11Std
-sleep 5m
-# For commit interval evaluation
-./run_loop.sh 4 "5000 10000 15000 20000 25000 30000" "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" 160
\ No newline at end of file
diff --git a/execution/execution_tmp_200507.sh b/execution/execution_tmp_200507.sh
deleted file mode 100644
index 932940ae7..000000000
--- a/execution/execution_tmp_200507.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-#./run_loop.sh 1 "50000 100000 150000 200000 250000 300000" "1 2 3 4 5" 40 #3Std
-./run_loop.sh 1 "200000 250000 300000" "1 2 3 4 5" 40 1000m 4Gi 100 5 #1.5Std
-sleep 1m
-#./run_loop.sh 1 "50000 100000 150000 200000 250000 300000" "1 2 3 4 5" 400 #3Std
-./run_loop.sh 1 "200000 250000 300000" "1 2 3 4 5" 400 1000m 4Gi 100 5 #1.5Std
-sleep 1m
-
-#./run_loop.sh 3 "50000 100000 150000 200000 250000 300000" "1 2 3 4 5 6 7 8 9 10" 40 #6 Std
-./run_loop.sh 3 "200000 250000 300000" "1 2 3 4 5 6 7 8 9 10" 40 1000m 4Gi 100 5 #3 Std
-sleep 1m
-#./run_loop.sh 3 "50000 100000 150000 200000 250000 300000" "1 2 3 4 5 6 7 8 9 10" 400 #6 Std
-./run_loop.sh 3 "200000 250000 300000" "1 2 3 4 5 6 7 8 9 10" 400 1000m 4Gi 100 5 #3 Std
-sleep 1m
-
-./run_loop.sh 1 "50000 100000 150000 200000 250000 300000" "1 2 3 4 5" 40 500m 2Gi 100 5 #3Std
diff --git a/execution/exp_counter.txt b/execution/exp_counter.txt
index 573541ac9..d00491fd7 100644
--- a/execution/exp_counter.txt
+++ b/execution/exp_counter.txt
@@ -1 +1 @@
-0
+1
diff --git a/execution/run_loop.sh b/execution/run_loop.sh
index e63c0ecdf..b139ad6ff 100755
--- a/execution/run_loop.sh
+++ b/execution/run_loop.sh
@@ -10,7 +10,7 @@ KAFKA_STREAMS_COMMIT_INTERVAL_MS=${7:-100}
 EXECUTION_MINUTES=${8:-5}
 
 # Get and increment counter
-EXP_ID=$(cat exp_counter.txt)
+EXP_ID=$(cat exp_counter.txt 2>/dev/null || echo "0")
 echo $((EXP_ID+1)) > exp_counter.txt
 
 # Store meta information
-- 
GitLab