From: Stefan Fritsch <sf@apache.org>
Date: Sun, 24 Jan 2010 20:58:19 +0000 (+0000)
Subject: ab: Fix number of requests per second in HTML output being to large by a
X-Git-Tag: 2.3.6~554
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d86539b1e1912981bba20f0e0241775362f17f4;p=apache

ab: Fix number of requests per second in HTML output being to large by a
factor of 1000

PR: 48594


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@902642 13f79535-47bb-0310-9956-ffa450edef68
---

diff --git a/CHANGES b/CHANGES
index e0782208cf..4a43633863 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.3.6
 
+  *) ab: Fix calculation of requests per second in HTML output. PR 48594.
+     [Stefan Fritsch]
+
   *) mod_authnz_ldap: Failures to map a username to a DN, or to check a user
      password now result in an informational level log entry instead of 
      warning level.  [Eric Covener]
diff --git a/support/ab.c b/support/ab.c
index 734176596f..abb3c2017c 100644
--- a/support/ab.c
+++ b/support/ab.c
@@ -1103,7 +1103,7 @@ static void output_html_results(void)
     if (timetaken) {
         printf("<tr %s><th colspan=2 %s>Requests per second:</th>"
            "<td colspan=2 %s>%.2f</td></tr>\n",
-           trstring, tdstring, tdstring, (double) done * 1000 / timetaken);
+           trstring, tdstring, tdstring, (double) done / timetaken);
         printf("<tr %s><th colspan=2 %s>Transfer rate:</th>"
            "<td colspan=2 %s>%.2f kb/s received</td></tr>\n",
            trstring, tdstring, tdstring, (double) totalread / timetaken);