Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 2851e89b authored by aumgn's avatar aumgn
Browse files

[exp] Fix awk sdev computation

parent b97a98b3
......@@ -228,8 +228,8 @@ run_iterations() {
printf '.'
done
avg=$(awk '{ sum += $1 } END { if (NR > 0) print sum / NR; else print NaN }' $exp_dir/*/time)
sd=$(awk '{ sum += $1; sum2 += $0^2 } END { print sqrt(sum2 / NR - (sum/NR)^2)}' $exp_dir/*/time)
avg=$(awk '{ sum += $1 } END { if (NR > 0) print sum / NR; else print NaN }' $exp_dir/*/time)
sd=$(awk '{ sum += $1; sum2 += $0^2 } END { print sqrt(abs(sum2 / NR - (sum/NR)^2)) } function abs(x){return ( x >= 0 ) ? x : -x }' $exp_dir/*/time)
printf ' | Avg: %6.2f ~%3.2f\n' $avg $sd
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment