Skip to content

Commit bd32496

Browse files
authored
Merge pull request #14 from seeker89/speed
Improve build speed
2 parents 748a11f + d8f648a commit bd32496

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

examples/killer-whiles/cereal_killer.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo "Wait some time in-between killings"
1414
sleep 2
1515
echo
1616

17-
echo "Killing instance A (port 8002)"
17+
echo "Killing instance B (port 8002)"
1818
ps auxf | grep 8002 | awk '{system("sudo kill " $2)}'
1919
sleep 0.5
2020
systemctl status faas001_b

examples/killer-whiles/killer_while.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ while [ $i -le 5 ]
66
do
77
echo "Killing faas001_a ${i}th time"
88
ps auxf | grep killer-whiles | grep python | grep 8001 | awk '{system("sudo kill " $2)}'
9-
sleep 0.5
9+
sleep 1.25
1010
i=$[$i+1]
1111
done
1212

@@ -20,7 +20,7 @@ while [ $i -le 5 ]
2020
do
2121
echo "Killing faas001_b ${i}th time"
2222
ps auxf | grep killer-whiles | grep python | grep 8002 | awk '{system("sudo kill " $2)}'
23-
sleep 0.5
23+
sleep 1.25
2424
i=$[$i+1]
2525
done
2626

vm/Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ validate:
99

1010
build: validate
1111
${packer_bin} build -on-error=ask ${template_file}
12-
ls -al ${output_dir}
12+
ls -alh ${output_dir}
1313

1414
package:
1515
shasum -a 256 ${output_dir}/* | tee chaos-engineering-VM.sha256
1616
zip -s 1g -sv ${vm_name}.zip ${output_dir}/*
1717
shasum -a 256 ${vm_name}* | tee parts.sha256
1818
ls -alh ${vm_name}*
1919

20-
.PHONY: validate build package
20+
clean:
21+
rm -rf ${output_dir}
22+
23+
.PHONY: validate build package clean

vm/ansible.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[defaults]
2+
callback_whitelist = profile_tasks

vm/ansible/prerequisites/tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
echo 1 > /proc/sys/vm/overcommit_memory
113113
114114
- name: Prebuild python 3.7 from source with dtrace support
115-
become: make
116115
shell: |
117116
# install the dependencies
118117
sudo apt-get install -y build-essential
@@ -136,10 +135,11 @@
136135
curl -o Python-3.7.0.tgz https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
137136
tar -xzf Python-3.7.0.tgz
138137
cd Python-3.7.0
139-
./configure --with-dtrace --enable-optimizations
138+
./configure --with-dtrace --without-tests
140139
make
141140
#make test
142141
sudo make install
142+
./python --version
143143
144144
- name: Install pip dependencies
145145
become: true

0 commit comments

Comments
 (0)