-
Notifications
You must be signed in to change notification settings - Fork 1
/
execute-service-behavior-analysis.sh
executable file
·89 lines (67 loc) · 2.58 KB
/
execute-service-behavior-analysis.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
BASE_DIR=$(cd "$(dirname "$0")"; pwd)
. $BASE_DIR/config
. $BASE_DIR/common-functions.sh
function usage() {
error "Usage: $0 <EXPERIMENT ID>"
}
if [ "$1" == "" ] ; then
error "missing experiment id"
usage
exit 1
else
EXPERIMENT_ID=$1
fi
USE_DATA_DIR="$DATA_DIR/$EXPERIMENT_ID"
checkDirectory result "${RESULT_DIR}"
# compute setup
if [ -f $USE_DATA_DIR/kieker.map ] ; then
KIEKER_DIRECTORIES=$USE_DATA_DIR
else
KIEKER_DIRECTORIES=""
for D in `ls $USE_DATA_DIR` ; do
if [ -f $USE_DATA_DIR/$D/kieker.map ] ; then
if [ "$KIEKER_DIRECTORIES" == "" ] ;then
KIEKER_DIRECTORIES="$USE_DATA_DIR/$D"
else
KIEKER_DIRECTORIES="$KIEKER_DIRECTORIES:$USE_DATA_DIR/$D"
fi
else
error "$USE_DATA_DIR/$D is not a kieker log directory."
exit 1
fi
done
fi
information "Kieker directories $KIEKER_DIRECTORIES"
cat << EOF > analysis.config
## The name of the Kieker instance.
kieker.monitoring.metadata=true
kieker.tools.source.LogsReaderCompositeStage.logDirectories=$KIEKER_DIRECTORIES
iobserve.analysis.traces=true
iobserve.analysis.dataFlow=true
iobserve.analysis.singleEventMode=true
# trace preparation (note they should be fixed)
iobserve.analysis.behavior.IEntryCallTraceMatcher=org.iobserve.analysis.systems.jpetstore.JPetStoreCallTraceMatcher
iobserve.analysis.behavior.IEntryCallAcceptanceMatcher=org.iobserve.analysis.systems.jpetstore.JPetStoreTraceAcceptanceMatcher
iobserve.analysis.behavior.ITraceSignatureCleanupRewriter=org.iobserve.analysis.systems.jpetstore.JPetStoreTraceSignatureCleanupRewriter
iobserve.analysis.behavior.IModelGenerationFilterFactory=org.iobserve.analysis.systems.jpetstore.JPetStoreEntryCallRulesFactory
iobserve.analysis.behavior.triggerInterval=3000
org.iobserve.service.behavior.analysis.returnClustering=false
org.iobserve.service.behavior.analysis.returnMedoids=true
org.iobserve.service.behavior.analysis.outputUrl=$RESULT_DIR/$EXPERIMENT_ID
org.iobserve.service.behavior.analysis.epsilon=9
org.iobserve.service.behavior.analysis.minPts=8
org.iobserve.service.behavior.analysis.maxModelAmount=-1
org.iobserve.service.behavior.analysis.nodeInsertionCost=80
org.iobserve.service.behavior.analysis.edgeInsertionCost=30
org.iobserve.service.behavior.analysis.eventGroupInsertionCost=10
EOF
information "start analysis"
information "$SERVICE_BEHAVIOR_ANALYSIS"
checkExecutable service-behavior-analysis "${SERVICE_BEHAVIOR_ANALYSIS}"
export ANALYSIS_OPTS="-Xmx24g -Xms10m -Dlog4j.configuration=file://$BASE_DIR/log4j.cfg"
$SERVICE_BEHAVIOR_ANALYSIS -c analysis.config
rm analysis.config
information "Analysis complete."
information "$RESULT_DIR"
# end