httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@locus.apache.org
Subject cvs commit: apache-2.0/src/support ab.c
Date Sun, 16 Jul 2000 00:06:40 GMT
fielding    00/07/15 17:06:40

  Modified:    src      CHANGES
               src/support ab.c
  Log:
  ab would start up more connections than needed, then quit when the
  desired number were finished. Also fixed a logic error involving
  ab keepalives.
  
  Submitted by:	Victor J. Orlikowski
  Reviewed by:	Roy Fielding
  
  Revision  Changes    Path
  1.170     +5 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.169
  retrieving revision 1.170
  diff -u -r1.169 -r1.170
  --- CHANGES	2000/07/06 15:27:51	1.169
  +++ CHANGES	2000/07/16 00:06:39	1.170
  @@ -1,4 +1,9 @@
   Changes with Apache 2.0a5
  +
  +  *) ab would start up more connections than needed, then quit when the
  +     desired number were finished. Also fixed a logic error involving
  +     ab keepalives.  [Victor J. Orlikowski]
  +
     *) WinNT: Implement non-blocking pipes with timeouts to communicate
        with CGIs. Apache 2.0a4 had non-blocking pipes but without 
        timeouts (i.e, if a timeout was specified, the pipe reverted to
  
  
  
  1.19      +8 -3      apache-2.0/src/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/support/ab.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ab.c	2000/06/12 23:03:04	1.18
  +++ ab.c	2000/07/16 00:06:39	1.19
  @@ -203,6 +203,7 @@
   int totalposted = 0;        	/* total number of bytes posted, inc. headers */
   int done = 0;        		/* number of requests we have done */
   int doneka = 0;        		/* number of keep alive connections done */
  +int started = 0;		/* number of requests started, so no excess */
   int good = 0, bad = 0;        	/* number of good and bad requests */
   
   /* store error cases */
  @@ -474,6 +475,8 @@
   {
       ap_status_t rv;
   
  +    if(!(started < requests)) return;
  +
       c->read = 0;
       c->bread = 0;
       c->keepalive = 0;
  @@ -501,10 +504,12 @@
                   err("\nTest aborted after 10 failures\n\n");
               }
               start_connect(c);
  +            return;
           }
       }
   
       /* connected first time */
  +    started++;
       write_request(c);
   }
   
  @@ -516,7 +521,7 @@
   {
       if (c->read == 0 && c->keepalive) {
           /* server has legitimately shut down an idle keep alive request */
  -        good--;			/* connection never happend */
  +        if (good) good--;	/* connection never happened */
       }
       else {
           if (good == 1) {
  @@ -848,14 +853,14 @@
   static void copyright(void)
   {
       if (!use_html) {
  -        printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.18 $>
apache-2.0");
  +        printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.19 $>
apache-2.0");
           printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
           printf("Copyright (c) 1998-2000 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", AB_VERSION, "$Revision: 1.18 $");
  +        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i>
apache-2.0<br>\n", AB_VERSION, "$Revision: 1.19 $");
           printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
           printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/<br>\n");
           printf("</p>\n<p>\n");
  
  
  

Mime
View raw message