Skip to content

Commit 90929ab

Browse files
Nikita SokolovNikita Sokolov
authored andcommitted
[WIP] Travis CI benchmarks
1 parent 159c9a5 commit 90929ab

9 files changed

Lines changed: 33 additions & 24 deletions

File tree

.travis.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
language: java
2+
matrix:
3+
include:
4+
- script:
5+
- travis_wait 20 mvn --errors --batch-mode clean package
6+
7+
after_failure:
8+
- ls -al
9+
- export SSHPASS=$FLAME_PASS
10+
- sshpass -e scp -v -o stricthostkeychecking=no runtime/oom.hprof flamestream@marnikitta.com:~/$TRAVIS_BUILD_ID.hprof
11+
- before_install:
12+
- git lfs pull --include benchmark/wiki-dumps/1000.xml
13+
- sudo apt-get update
14+
- sudo apt-get install software-properties-common -y
15+
- sudo apt-add-repository ppa:ansible/ansible -y
16+
- sudo apt-get update
17+
- sudo apt-get install ansible -y
18+
services: docker
19+
script:
20+
- ln -s ../../../../wiki-dumps/1000.xml benchmark/ansible/roles/flamestream-bench/files/wiki.xml
21+
- timeout 8 ./run_benchmarks.sh
22+
after_script:
23+
- docker exec worker1 cat /opt/flamestream/worker.log
24+
- docker exec worker2 cat /opt/flamestream/worker.log
25+
- docker exec worker2 cat /opt/flamestream/bench.log
226

327
sudo: required
428

@@ -20,11 +44,3 @@ env:
2044
- JAVA_OPTS="-Xmx256m -Xms256m"
2145

2246
install: true
23-
24-
script:
25-
- travis_wait 20 mvn --errors --batch-mode clean package
26-
27-
after_failure:
28-
- ls -al
29-
- export SSHPASS=$FLAME_PASS
30-
- sshpass -e scp -v -o stricthostkeychecking=no runtime/oom.hprof flamestream@marnikitta.com:~/$TRAVIS_BUILD_ID.hprof

benchmark/ansible/group_vars/all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
rate: 50
22
guarantees: AT_MOST_ONCE
33
millis_between_commits: 50
4-
validator: Wiki10000Validator
4+
validator: Wiki1000Validator
55
base_dir: /opt
66

77
flamestream_dir: "{{ base_dir }}/flamestream"

benchmark/ansible/roles/flamestream-bench/tasks/main.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
src: bench.conf.j2
1515
dest: "{{ flamestream_dir }}/bench.conf"
1616

17-
- name: Clean shm
18-
shell: rm -rf /dev/shm/aeron*
19-
2017
- name: Start the flamestream bench
2118
shell: >
2219
java

benchmark/ansible/roles/flamestream-destroy/tasks/main.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
path: "{{ flamestream_dir }}/data/"
88
state: absent
99

10-
- name: Fetch replay times
11-
fetch:
12-
src: /tmp/elements.cnt
13-
dest: results/{{ lookup("pipe", "git rev-parse --short HEAD") }}/{{ groups['workers'] | length }}/{{ rate }}/flamestream/rate/{{ inventory_hostname }}.cnt
14-
flat: true
15-
1610
- name: Fetch worker logs
1711
fetch:
1812
src: "{{ flamestream_dir }}/worker.log"

benchmark/ansible/roles/flamestream-worker/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
src: worker.json.j2
1313
dest: "{{ flamestream_dir }}/worker.json"
1414

15-
- name: Run flamstream
15+
- name: Run flamestream
1616
shell: "cd {{ flamestream_dir }} && bash entrypoint.sh restart worker.json"

run_benchmarks.sh

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ copy_flink_artifacts() {
3838
}
3939

4040
docker_compose_up() {
41-
sudo docker-compose -f "$DOCKER_COMPOSE" up -d
41+
docker-compose -f "$DOCKER_COMPOSE" up -d
4242
}
4343

4444
local_bench() {
4545
docker_compose_up \
4646
&& package \
4747
&& copy_worker_artifacts \
48-
&& sudo ansible-playbook -v -i "${ANSIBLE_HOME}/local.yml" "${ANSIBLE_HOME}/flamestream.yml"
48+
&& ansible-playbook -v -i "${ANSIBLE_HOME}/local.yml" "${ANSIBLE_HOME}/flamestream.yml"
4949
}
5050

5151
remote_bench() {
@@ -67,4 +67,4 @@ remote_flink_bench() {
6767
&& ansible-playbook -v -i "${ANSIBLE_HOME}/aws.yml" "${ANSIBLE_HOME}/flink.yml"
6868
}
6969

70-
[[ "$0" == "$BASH_SOURCE" ]] && remote_bench
70+
[[ "$0" == "$BASH_SOURCE" ]] && local_bench

runtime/src/main/java/com/spbsu/flamestream/runtime/WorkerApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ public void run() {
7777
final Map<String, String> props = new HashMap<>();
7878
props.put("akka.remote.artery.canonical.hostname", host.host());
7979
props.put("akka.remote.artery.canonical.port", String.valueOf(host.port()));
80+
props.put("akka.remote.artery.bind.hostname", "0.0.0.0");
81+
props.put("akka.remote.artery.bind.port", String.valueOf(host.port()));
8082
try {
8183
final File shm = new File(("/dev/shm"));
8284
if (shm.exists() && shm.isDirectory()) {

runtime/src/main/resources/logback.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</encoder>
2525
</appender>
2626

27-
<root level="WARN">
27+
<root level="INFO">
2828
<appender-ref ref="STDOUT"/>
2929
<appender-ref ref="FILE"/>
3030
</root>

runtime/src/test/resources/logback-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</encoder>
99
</appender>
1010

11-
<root level="WARN">
11+
<root level="INFO">
1212
<appender-ref ref="STDOUT"/>
1313
</root>
1414
</configuration>

0 commit comments

Comments
 (0)