tests/bench: import wrapper script used for blog charts

This commit is contained in:
David Wilson 2018-04-02 07:26:52 +00:00
parent 047458a8b3
commit eb402c8bd4
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
#!/bin/bash
#
# Wrap a run of Ansible playbook so that CPU usage counters and network
# activity are logged to files.
#
[ ! "$1" ] && exit 1
sudo tcpdump -w $1-out.cap -s 0 host k1.botanicus.net &
date +%s.%N > $1-task-clock.csv
perf stat -x, -I 25 -e task-clock --append -o $1-task-clock.csv ansible-playbook run_hostname_100_times.yml
sudo pkill -f tcpdump