profile.sh 409 Bytes
Newer Older
Kai Vogelgesang's avatar
Kai Vogelgesang committed
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/env bash

which gprof

run_in() {
    (cd $1; ${@:2})
}

to="timeout -s INT 30 "

mkdir -p gprof_send gprof_recv

13 14
run_in gprof_recv $to ../receiver -p 5000 -r 4095 -o receiver.csv &
run_in gprof_send $to ../sender -t 127.0.0.1 -p 5000 -r 4095 -o sender.csv
Kai Vogelgesang's avatar
Kai Vogelgesang committed
15 16 17 18 19 20 21

wait

gprof ./receiver gprof_recv/gmon.out > gprof-recv.txt
gprof ./sender gprof_send/gmon.out > gprof-send.txt

rm -r gprof_send gprof_recv