-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsls.sh
More file actions
executable file
·44 lines (35 loc) · 801 Bytes
/
sls.sh
File metadata and controls
executable file
·44 lines (35 loc) · 801 Bytes
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
#!/usr/bin/env bash
function print_usage {
echo -e "usage: sls.sh TraceFile [TopologyFile]"
echo -e
echo -e "Starts SLS with the given trace file."
}
if [[ -z $1 ]]; then
print_usage
exit 1
fi
TRACE_FILE=$(realpath $1)
TOPOLOGY_FILE=""
if [[ ! -z $2 ]]; then
TOPOLOGY_FILE=$(realpath $2)
fi
if [[ ! -f ${TRACE_FILE} ]]; then
echo "Job Trace File not found: ${TRACE_FILE}"
print_usage
exit 1
fi
if [[ ! -f ${TOPOLOGY_FILE} ]]; then
echo "Topology File not found: ${TRACE_FILE}"
print_usage
exit 1
fi
cd sls
OUTPUT_DIRECTORY="/tmp/sls"
mkdir -p ${OUTPUT_DIRECTORY}
ARGS="-inputsls ${TRACE_FILE}"
if [[ ! -z ${TOPOLOGY_FILE} ]]; then
ARGS+=" -nodes ${TOPOLOGY_FILE}"
fi
ARGS+=" -output ${OUTPUT_DIRECTORY}"
ARGS+=" -printsimulation"
mvn exec:java -Dexec.args="${ARGS}"