]> granicus.if.org Git - apache/commitdiff
The 2 first patches from PR45355 have been ported
authorChristophe Jaillet <jailletc36@apache.org>
Sat, 2 Mar 2013 08:13:16 +0000 (08:13 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sat, 2 Mar 2013 08:13:16 +0000 (08:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451849 13f79535-47bb-0310-9956-ffa450edef68

support/ab.c

index f20bae32c571013fd214cb39e8e8a2a07b9553f0..a9186ca8638521f1b311f4ca7484bb8e2c0417ab 100644 (file)
@@ -815,9 +815,9 @@ static void output_results(int sig)
                (double) totalread / 1024 / timetaken);
         if (send_body) {
             printf("                        %.2f kb/s sent\n",
-               (double) totalposted / timetaken / 1024);
+               (double) totalposted / 1024 / timetaken);
             printf("                        %.2f kb/s total\n",
-               (double) (totalread + totalposted) / timetaken / 1024);
+               (double) (totalread + totalposted) / 1024 / timetaken);
         }
     }
 
@@ -1100,16 +1100,16 @@ static void output_html_results(void)
            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);
+           trstring, tdstring, tdstring, (double) totalread / 1024 / timetaken);
         if (send_body) {
             printf("<tr %s><td colspan=2 %s>&nbsp;</td>"
                "<td colspan=2 %s>%.2f kb/s sent</td></tr>\n",
                trstring, tdstring, tdstring,
-               (double) totalposted / timetaken);
+               (double) totalposted / 1024 / timetaken);
             printf("<tr %s><td colspan=2 %s>&nbsp;</td>"
                "<td colspan=2 %s>%.2f kb/s total</td></tr>\n",
                trstring, tdstring, tdstring,
-               (double) (totalread + totalposted) / timetaken);
+               (double) (totalread + totalposted) / 1024 / timetaken);
         }
     }
     {
@@ -1703,7 +1703,7 @@ static void test(void)
         exit(1);
     }
 #endif              /* NOT_ASCII */
-    
+
     if (myhost) {
         /* This only needs to be done once */
         if ((rv = apr_sockaddr_info_get(&mysa, myhost, APR_UNSPEC, 0, 0, cntxt)) != APR_SUCCESS) {
@@ -1715,7 +1715,7 @@ static void test(void)
     }
 
     /* This too */
-    if ((rv = apr_sockaddr_info_get(&destsa, connecthost, 
+    if ((rv = apr_sockaddr_info_get(&destsa, connecthost,
                                     myhost ? mysa->family : APR_UNSPEC,
                                     connectport, 0, cntxt))
        != APR_SUCCESS) {
@@ -1922,7 +1922,7 @@ static void usage(const char *progname)
 #endif
 
     fprintf(stderr, "    -Z ciphersuite  Specify SSL/TLS cipher suite (See openssl ciphers)\n");
-    fprintf(stderr, "    -f protocol     Specify SSL/TLS protocol\n"); 
+    fprintf(stderr, "    -f protocol     Specify SSL/TLS protocol\n");
     fprintf(stderr, "                    (" SSL2_HELP_MSG "SSL3, TLS1" TLS1_X_HELP_MSG " or ALL)\n");
 #endif
     exit(EINVAL);