Skip to content

Commit a745405

Browse files
authored
Merge pull request #3517 from tautschnig/perf-test-cleanup
Performance testing script: cleanup, bugfixes, new features
2 parents 5f55c33 + 1614a5f commit a745405

File tree

6 files changed

+407
-329
lines changed

6 files changed

+407
-329
lines changed

scripts/perf-test/codebuild.yaml

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ Resources:
3232
Version: 2012-10-17
3333
Statement:
3434
- Action:
35+
- "s3:GetObject"
3536
- "s3:PutObject"
3637
Effect: Allow
3738
Resource: !Join ["/", [!Sub "arn:aws:s3:::${S3Bucket}", "*"]]
39+
- Action:
40+
- "s3:ListBucket"
41+
Effect: Allow
42+
Resource: !Sub "arn:aws:s3:::${S3Bucket}"
3843
- Action:
3944
- "logs:CreateLogGroup"
4045
- "logs:CreateLogStream"
@@ -65,16 +70,31 @@ Resources:
6570
- echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main" > /etc/apt/sources.list.d/toolchain.list
6671
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA9EF27F
6772
- apt-get update -y
68-
- apt-get install -y libwww-perl g++-5 flex bison git openjdk-7-jdk
73+
- apt-get install -y libwww-perl g++-5 flex bison git ccache
6974
- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
7075
- update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 1
76+
- |
77+
cd /root/
78+
aws s3 cp \
79+
s3://${S3Bucket}/release-build-cache/ccache.zip \
80+
ccache.zip && unzip ccache.zip || true
81+
cd $CODEBUILD_SRC_DIR
7182
build:
7283
commands:
7384
- echo ${Repository} > COMMIT_INFO
7485
- git rev-parse --short HEAD >> COMMIT_INFO
7586
- git log HEAD^..HEAD >> COMMIT_INFO
7687
- make -C src minisat2-download glucose-download cadical-download
77-
- make -C src -j8
88+
- export CCACHE_NOHASHDIR=1 ; make -C src CXX="ccache g++" -j8
89+
- ccache -s
90+
post_build:
91+
commands:
92+
- |
93+
cd /root/
94+
zip -r ccache.zip .ccache
95+
aws s3 cp ccache.zip \
96+
s3://${S3Bucket}/release-build-cache/ccache.zip
97+
cd $CODEBUILD_SRC_DIR
7898
artifacts:
7999
files:
80100
- src/cbmc/cbmc
@@ -107,16 +127,31 @@ Resources:
107127
- echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main" > /etc/apt/sources.list.d/toolchain.list
108128
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA9EF27F
109129
- apt-get update -y
110-
- apt-get install -y libwww-perl g++-5 flex bison git openjdk-7-jdk
130+
- apt-get install -y libwww-perl g++-5 flex bison git ccache
111131
- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
112132
- update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 1
133+
- |
134+
cd /root/
135+
aws s3 cp \
136+
s3://${S3Bucket}/profiling-build-cache/ccache.zip \
137+
ccache.zip && unzip ccache.zip || true
138+
cd $CODEBUILD_SRC_DIR
113139
build:
114140
commands:
115141
- echo ${Repository} > COMMIT_INFO
116142
- git rev-parse --short HEAD >> COMMIT_INFO
117143
- git log HEAD^..HEAD >> COMMIT_INFO
118144
- make -C src minisat2-download glucose-download cadical-download
119-
- make -C src -j8 CXXFLAGS="-O2 -pg -g -finline-limit=4" LINKFLAGS="-pg"
145+
- export CCACHE_NOHASHDIR=1 ; make -C src CXX="ccache g++" -j8 CXXFLAGS="-O2 -pg -g -finline-limit=4" LINKFLAGS="-pg"
146+
- ccache -s
147+
post_build:
148+
commands:
149+
- |
150+
cd /root/
151+
zip -r ccache.zip .ccache
152+
aws s3 cp ccache.zip \
153+
s3://${S3Bucket}/profiling-build-cache/ccache.zip
154+
cd $CODEBUILD_SRC_DIR
120155
artifacts:
121156
files:
122157
- src/cbmc/cbmc

scripts/perf-test/ebs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Resources:
2828
apt-get -y update
2929
apt-get install git
3030
cd /mnt
31-
git clone --depth 1 --branch svcomp18 \
31+
git clone --depth 1 --branch svcomp19 \
3232
https://github.com/sosy-lab/sv-benchmarks.git
3333
git clone --depth 1 \
3434
https://github.com/sosy-lab/benchexec.git

scripts/perf-test/ec2-terminate.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
### BEGIN INIT INFO
3+
# Provides: ec2-terminate
4+
# Required-Start: $network $syslog
5+
# Required-Stop:
6+
# Default-Start:
7+
# Default-Stop: 0 1 6
8+
# Short-Description: ec2-terminate
9+
# Description: send termination email
10+
### END INIT INFO
11+
#
12+
13+
case "$1" in
14+
start|status)
15+
exit 0
16+
;;
17+
stop)
18+
# run the below
19+
;;
20+
*)
21+
exit 1
22+
;;
23+
esac
24+
25+
# send instance-terminated message
26+
# http://rogueleaderr.com/post/48795010760/how-to-notifyemail-yourself-when-an-ec2-instance/amp
27+
ut=$(cat /proc/uptime | cut -f1 -d" ")
28+
aws --region us-east-1 sns publish \
29+
--topic-arn #SNSTOPIC# \
30+
--message "instance terminating after $ut s at #MAXPRICE# USD/h"
31+
sleep 3 # make sure the message has time to send
32+
aws s3 cp /var/log/cloud-init-output.log \
33+
s3://#S3BUCKET#/#PERFTESTID#/$HOSTNAME.cloud-init-output.log
34+
35+
exit 0

0 commit comments

Comments
 (0)