]> granicus.if.org Git - apache/commitdiff
simplify some code in output_results() just a bit to avoid a
authorJeff Trawick <trawick@apache.org>
Wed, 22 Aug 2001 18:58:36 +0000 (18:58 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 22 Aug 2001 18:58:36 +0000 (18:58 +0000)
bug in gcc 2.7.2.3 on FreeBSD 3.4; didn't hit the problem with
-O2; did hit the problem with no -O

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

support/ab.c

index 44d5386d8182a632a76aa4a7660da83905dbf3a6..d694d4d48eadfd349464d637c324f8a96b1fccb9 100644 (file)
@@ -573,6 +573,8 @@ static void output_results(void)
            }
            fprintf(out, "starttime\tseconds\tctime\tdtime\tttime\twait\n");
            for (i = 0; i < requests; i++) {
+                apr_time_t diff = stats[i].time - stats[i].ctime;
+
                sttime = stats[i].starttime;
                (void) apr_ctime(tmstring, sttime);
                tmstring[strlen(tmstring) - 1] = '\0';  /* ctime returns a
@@ -582,7 +584,7 @@ static void output_results(void)
                        tmstring,
                        sttime,
                        stats[i].ctime,
-                       stats[i].time - stats[i].ctime,
+                       diff,
                        stats[i].time,
                        stats[i].waittime);
            }
@@ -1301,14 +1303,14 @@ static void test(void)
 static void copyright(void)
 {
     if (!use_html) {
-       printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.81 $> apache-2.0");
+       printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.82 $> apache-2.0");
        printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
        printf("Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/\n");
        printf("\n");
     }
     else {
        printf("<p>\n");
-       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AP_SERVER_BASEREVISION, "$Revision: 1.81 $");
+       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AP_SERVER_BASEREVISION, "$Revision: 1.82 $");
        printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
        printf(" Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/<br>\n");
        printf("</p>\n<p>\n");