summaryrefslogtreecommitdiff
path: root/zttest.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-03-29 05:23:08 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-03-29 05:23:08 +0000
commitf13dc72c35a8c6625a47bb4c85b87a2baac3b60d (patch)
tree9fb97290c0ee7faeaa9fe09425da02dd8ceb1bed /zttest.c
parent1daa0c97486f0dfba3d0fa0ee9d87a26f77e5973 (diff)
Improve zttest (bug #3705)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@609 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zttest.c')
-rwxr-xr-xzttest.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/zttest.c b/zttest.c
index 86551a0..a70b623 100755
--- a/zttest.c
+++ b/zttest.c
@@ -13,11 +13,12 @@
static int pass = 0;
static float best = 0.0;
static float worst = 100.0;
+static float total = 0.0;
void hup_handler(int sig)
{
printf("\n--- Results after %d passes ---\n", pass);
- printf("Best: %f -- Worst: %f\n", best, worst);
+ printf("Best: %f -- Worst: %f -- Average: %f\n", best, worst, pass ? total/pass : 100.00);
exit(0);
}
@@ -71,6 +72,7 @@ int main(int argc, char *argv[])
if (score < worst)
worst = score;
printf("%f%% ", score);
+ total += score;
fflush(stdout);
count = 0;
pass++;