Skip to content

Commit b652c1d

Browse files
committed
do not loop transfers inside ansible role; better logging
1 parent 812cfb9 commit b652c1d

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

tests/perf.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,29 @@
3030
gather_facts: no
3131
tasks:
3232
- name: init database
33-
shell: "~/pg_cluster/install/bin/dtmbench {{connections}} -a 1000000 -i"
33+
shell: "~/pg_cluster/install/bin/dtmbench {{connections}} -a 2000000 -i"
3434
register: init_result
3535
- debug: var=init_result
3636

3737
- hosts: clients
3838
gather_facts: no
3939
tasks:
4040

41+
- local_action: shell echo "Bench started at `date`" >> perf.results
42+
4143
- name: run transfers
42-
shell: '~/pg_cluster/install/bin/dtmbench {{connections}} -w {{item}} -s {{offset}} -d 100000 -r 1 -n 1000 -a 2000000 | tee -a perf.results | sed "s/^/`hostname`:/"'
44+
shell: >
45+
~/pg_cluster/install/bin/dtmbench {{connections}}
46+
-w {{conns | d(200)}} -s {{offset}} -d 100000 -r 1 -n 1000 -a 2000000 |
47+
tee -a perf.results |
48+
sed "s/^/`hostname`:/"
4349
register: transfers_result
4450
environment:
4551
LD_LIBRARY_PATH: "/home/{{ansible_ssh_user}}/pg_cluster/install/lib"
46-
with_sequence: start=100 end=400 stride=50
4752

48-
- local_action: shell echo "{{transfers_result.results | map(attribute='stdout') | join('\n')}}" >> perf.results
53+
- debug: var=transfers_result
54+
55+
- local_action: 'shell echo "{{transfers_result.stdout }}" >> perf.results'
56+
57+
- local_action: shell echo "Bench finished at `date`" >> perf.results
4958

50-
- debug: msg="{{ transfers_result.results | map(attribute='stdout') | join('\n') }}"

0 commit comments

Comments
 (0)