-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrunSimplePerformance.fish
executable file
·92 lines (82 loc) · 2.53 KB
/
runSimplePerformance.fish
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
90
91
92
#!/usr/bin/env fish
source jenkins/helper/jenkins.fish
set -xg simple (pwd)/performance
set -xg date (date +%Y%m%d)
set -xg datetime (date +%Y%m%d%H%M)
if test -z "$ARANGODB_TEST_CONFIG"
set -xg ARANGODB_TEST_CONFIG run-small-edges.js
end
cleanPrepareLockUpdateClear2
and if test -z "$DOCKER_IMAGE"
enterprise
and switchBranches $ARANGODB_BRANCH $ENTERPRISE_BRANCH true
and updateDockerBuildImage
and maintainerOff
and releaseMode
and pingDetails
and showConfig
and set -xg NOSTRIP 1
and buildStaticArangoDB
end
and sudo rm -rf work/database $simple/results.csv
and cat /proc/sys/kernel/core_pattern
and echo "==== starting performance run ===="
and if test -z "$DOCKER_IMAGE"
"$DOCKER" run \
--ulimit core=-1 \
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
-v (pwd)/work/ArangoDB:/ArangoDB \
-v (pwd)/work:/data \
-v $simple:/performance \
arangodb/arangodb \
sh -c "cd /performance && \
/ArangoDB/build/install/usr/sbin/arangod \
-c none \
--javascript.app-path /tmp/app \
--javascript.startup-directory /ArangoDB/js \
--server.rest-server false \
--javascript.module-directory `pwd` \
--log.foreground-tty \
/data/database \
--javascript.script simple/$ARANGODB_TEST_CONFIG"
else
"$DOCKER" run \
--ulimit core=-1 \
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
-v (pwd)/work:/data \
-v $simple:/performance \
$DOCKER_IMAGE \
sh -c "cd /performance && \
/usr/sbin/arangod \
--javascript.app-path /tmp/app \
--server.rest-server false \
--javascript.module-directory `pwd` \
--log.foreground-tty \
/data/database \
--javascript.script simple/$ARANGODB_TEST_CONFIG"
end
set -l s $status
if count $simple/core* >/dev/null
"$DOCKER" run \
-v $simple:/performance \
--rm \
$DOCKER_IMAGE \
sh -c "cp /usr/sbin/arangod /performance; chmod a+rw /performance/core* /performance/arangod"
printf "\nCoredumps found after testrun:\n"
ls -l $simple/core* $simple/arangod
and 7z a $simple/../{$NODE_NAME}.coredumps.7z $simple/core* $simple/arangod
and rm -f $simple/core* $simple/arangod
echo "FAILED BY COREDUMP FOUND!"
set -l s 1
else
echo "no coredumps"
end
set -l resultname (echo $ARANGODB_BRANCH | tr "/" "_")
set -l localname work/results.csv
echo "storing results in $localname"
awk "{print \"$ARANGODB_BRANCH,$datetime,\" \$0}" \
< $simple/results.csv \
> $localname
sudo rm -rf work/database
cd "$HOME/$NODE_NAME/$OSKAR" ; moveResultsToWorkspace ; unlockDirectory
exit $s