From f0e66e003f89bb0be273f75eb98283db70310bbc Mon Sep 17 00:00:00 2001
From: Guillaume Damiand <guillaume.damiand@liris.cnrs.fr>
Date: Tue, 25 May 2021 13:39:51 +0200
Subject: [PATCH] Add script for gis files

---
 run-gis-test.sh | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100755 run-gis-test.sh

diff --git a/run-gis-test.sh b/run-gis-test.sh
new file mode 100755
index 0000000..078644b
--- /dev/null
+++ b/run-gis-test.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+################################################################################
+# Run tests on all the gis files
+# Usage run-gis-test [REPEAT]
+#     REPEAT is the number of runs to do for each file; computation time will be
+#            the average of these runs. 1 by default.
+REPEAT=1 # Number of runs; computation time will be the average
+PROG="./src/builds/release/parallel-arrangement-bench" # Executable name
+
+if (( $# > 1 ))
+   REPEAT=${1}
+fi   
+
+# Test function: 1st parameter: directory that contains segment files;  2nd parameter: options
+function test {
+echo "######################################## ${2} ###############################" >> times.dat
+echo "######################################## ${2} ################################" >> detailed-times.dat
+echo "######################################## ${2} ###############################" >> nbcells.dat
+
+for file in "${1}/"*.txt
+do
+    ${PROG} -t1 "${file}" -cgal -repeat ${REPEAT}
+    # echo -n "${file} - " >> times.dat
+    for i in 1 2 4 8 16 32
+    do
+        ${PROG} -t1 "${file}" -nbs $((i)) -nbt ${i} -repeat ${REPEAT} ${2}
+    done
+    echo "" >> times.dat
+    echo "" >> detailed-times.dat
+done
+}
+
+echo "################################################################################" >> times.dat
+echo "################################################################################" >> detailed-times.dat
+echo "################################################################################" >> nbcells.dat
+
+echo "#GlobalTimes CGAL 1 2 4 8 16 32" >> times.dat
+echo "#DetailedTimes LoadAndDispatch ComputeLocals ComputeLCC" >> detailed-times.dat
+echo "#NbCells HalfEdges Vertices Edges FiniteFaces Faces CriticalSegments" >> nbcells.dat
+
+gunzip ./data/countries/*.gzip 
+test ./data/countries "-crop"
-- 
GitLab