summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b432731)
raw | patch | inline | side by side (parent: b432731)
author | octo <octo> | |
Tue, 16 May 2006 19:10:46 +0000 (19:10 +0000) | ||
committer | octo <octo> | |
Tue, 16 May 2006 19:10:46 +0000 (19:10 +0000) |
src/oping.c | patch | blob | history |
diff --git a/src/oping.c b/src/oping.c
index 37f64b27a76831980bb60ddb48e2fc4b8c95301e..5940001bea1407bc1b331ffb1dbdaef23ec1bef0 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
num_total = (double) context->req_rcvd;
average = context->latency_total / num_total;
- deviation = sqrt (context->latency_total_square - (num_total * average * average));
+ deviation = sqrt (((num_total * context->latency_total_square) - (context->latency_total * context->latency_total))
+ / (num_total * (num_total - 1.0)));
printf ("rtt min/avg/max/sdev = %.3f/%.3f/%.3f/%.3f ms\n",
context->latency_min,