forked from microsoft/lamar-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker_run_vis_map_query_matrix.sh
More file actions
executable file
·59 lines (47 loc) · 1.88 KB
/
docker_run_vis_map_query_matrix.sh
File metadata and controls
executable file
·59 lines (47 loc) · 1.88 KB
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
55
56
57
58
59
#!/usr/bin/env bash
# Flags and arguments:
# --capture_path : path to capture directory
# This script will run matrix visualization on all combinations of given devices.
# You can tune it to your liking, or just run it once with wanted flags.
if [ -z "$CAPTURE_DIR" ]; then
echo "[ERROR] CAPTURE_DIR env var not set. Make sure to export CAPTURE_DIR=/path/to/data/root."
exit 1
fi
if [ -z "$LOCATION" ]; then
echo "[ERROR] LOCATION env var not set. Make sure to export LOCATION=location."
exit 1
fi
CAPTURE="${CAPTURE_DIR}/${LOCATION}"
FLAGS=(--ios --spot --hl)
echo "You are running with parameters: "
echo " Capture: ${CAPTURE}"
echo " Flags: ${FLAGS[@]}"
read -p "Do you want to continue? (y/n): " answer
if [[ ! "$answer" =~ ^[Yy]$ ]]; then
echo "Execution aborted."
exit 1
fi
echo "Running run_visualize_map_query_matrix with all combinations of 2 and 3 FLAGS on location {$LOCATION} inside a Docker ..."
# All 2-combinations
for ((i=0; i<${#FLAGS[@]}-1; i++)); do
for ((j=i+1; j<${#FLAGS[@]}; j++)); do
echo "Running run_visualize_map_query_matrix with FLAGS: ${FLAGS[i]} ${FLAGS[j]} ..."
docker run --rm \
-v "$CAPTURE":/data/capture_dir \
croco:scantools \
python3 -m scantools.run_visualize_map_query_matrix \
--capture_path /data/capture_dir \
"${FLAGS[i]}" "${FLAGS[j]}"
echo "Done, run_visualize_map_query_matrix process completed with FLAGS: ${FLAGS[i]} ${FLAGS[j]}."
done
done
# 3-combination
echo "Running run_visualize_map_query_matrix with FLAGS: ${FLAGS[*]} ..."
docker run --rm \
-v "$CAPTURE":/data/capture_dir \
croco:scantools \
python3 -m scantools.run_visualize_map_query_matrix \
--capture_path /data/capture_dir \
"${FLAGS[@]}"
echo "Done, run_visualize_map_query_matrix process completed with FLAGS: ${FLAGS[*]}."
echo "Done, run_visualize_map_query_matrix with all combinations of 2 and 3 FLAGS on $LOCATION."