howtos:calculate_average
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | howtos:calculate_average [02/12/2018 21:34] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Given result.txt looks like shown bellow, this two example calculates the Upload and Download average values: | ||
+ | < | ||
+ | cat result.txt |grep Upload|awk '{ sum += $2 } END { if (NR > 0) print sum / NR }' | ||
+ | |||
+ | cat result.txt |grep Download|awk '{ sum += $2 } END { if (NR > 0) print sum / NR }' | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | Tue Aug 8 16:44:15 CEST 2017 | ||
+ | Ping: 14.859 ms | ||
+ | Download: 444.21 Mbit/s | ||
+ | Upload: 38.20 Mbit/s | ||
+ | Tue Aug 8 16:44:38 CEST 2017 | ||
+ | Ping: 14.195 ms | ||
+ | Download: 363.48 Mbit/s | ||
+ | Upload: 76.13 Mbit/s | ||
+ | Tue Aug 8 16:45:00 CEST 2017 | ||
+ | Ping: 15.078 ms | ||
+ | Download: 244.67 Mbit/s | ||
+ | Upload: 82.88 Mbit/s | ||
+ | Tue Aug 8 16:45:27 CEST 2017 | ||
+ | Ping: 14.327 ms | ||
+ | Download: 508.94 Mbit/s | ||
+ | Upload: 57.22 Mbit/s | ||
+ | Tue Aug 8 16:45:50 CEST 2017 | ||
+ | Ping: 14.84 ms | ||
+ | Download: 529.74 Mbit/s | ||
+ | Upload: 80.20 Mbit/s | ||
+ | Tue Aug 8 16:46:09 CEST 2017 | ||
+ | Ping: 14.47 ms | ||
+ | Download: 520.76 Mbit/s | ||
+ | Upload: 76.64 Mbit/s | ||
+ | Tue Aug 8 16:46:29 CEST 2017 | ||
+ | Ping: 13.952 ms | ||
+ | Download: 442.88 Mbit/s | ||
+ | Upload: 56.64 Mbit/s | ||
+ | </ |
howtos/calculate_average.txt · Last modified: 02/12/2018 21:34 by 127.0.0.1