Merges George changes
[p2p-testing-infrastructure.git] / Utils / get_time_dl_speed_avg_for_swarm
1 #!/bin/bash
2 #
3 # Copyright: Calin-Andrei Burloiu, 2010, calin.burloiu@gmail.com
4 #
5 # This script calculates the download time and the average download speed for an entire swarm, printed in this order and taking as input the directory where the peers' *.log.data file are located. Requires script avg2 and get_time_dl_speed_avg.
6
7 path=.
8
9 if [ $# -gt 0 ]; then
10         path=$1
11 fi
12
13 rm -f temp1987
14 touch temp1987
15
16 for i in $(find $path -mindepth 1 -maxdepth 1 -name '*.log.data'); do
17         (./get_time_dl_speed_avg < "$i") >> temp1987
18 done
19
20 ./avg2 < temp1987
21
22 rm -f temp1987