]> granicus.if.org Git - apache/commitdiff
Leon Brocard writes:
authorMartin Kraemer <martin@apache.org>
Fri, 30 Aug 2002 12:26:14 +0000 (12:26 +0000)
committerMartin Kraemer <martin@apache.org>
Fri, 30 Aug 2002 12:26:14 +0000 (12:26 +0000)
> Hello,
>
> I love httpd2 and I really like apachebench but using the gnuplot
> output option (-g) gave me this:
>
>   starttime       seconds ctime   dtime   ttime   wait
>   Thu Aug 29 12:29:31 200        1030620571362758        0       54      54      0
>
> It's truncating the year. Now according to
> http://apr.apache.org/docs/apr/group__APR__Time.html#a15 "Unlike
> ANSI/ISO C ctime(), apr_ctime() does not include a \n", so the code
> and comment in ab.c are wrong, hence my attached patch to remove them.

Submitted by: Leon Brocard <acme@astray.com>

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

CHANGES
support/ab.c

diff --git a/CHANGES b/CHANGES
index 1ca195a65c9e97a480677fd881a3cae0563ea942..af32a05ec3583682a979b6823a5f45d74145ef89 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.41
 
+  *) Fix "ab -g"'s truncated year: the last digit was cut off.
+     [Leon Brocard <acme@astray.com>]
+
   *) mod_rewrite can now sets cookies in err_headers, uses the correct
      expiry date, and can now set the path as well
      PR 12132,12181,12172.
index d6922b79b3d074e57bb35696db0c9f771d88dd43..81926e4bd26ff089a83b7fcabbe8db405ebc04bf 100644 (file)
@@ -953,9 +953,6 @@ static void output_results(void)
 
                sttime = stats[i].starttime;
                (void) apr_ctime(tmstring, sttime);
-               tmstring[strlen(tmstring) - 1] = '\0';  /* ctime returns a
-                                                        * string with a
-                                                        * trailing newline */
                fprintf(out, "%s\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT "\n",
                        tmstring,
                        sttime,
@@ -1739,14 +1736,14 @@ static void test(void)
 static void copyright(void)
 {
     if (!use_html) {
-       printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1.116 $> apache-2.0");
+       printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1.117 $> apache-2.0");
        printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
        printf("Copyright (c) 1998-2002 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_AB_BASEREVISION, "$Revision: 1.116 $");
+       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AP_AB_BASEREVISION, "$Revision: 1.117 $");
        printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
        printf(" Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/<br>\n");
        printf("</p>\n<p>\n");