You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by di...@covalent.net on 2002/04/24 19:13:59 UTC
Re: cvs commit: httpd-2.0/support ab.c
Aaron,
Could you also ++i the version number ? I.e. in the past we changed the
VERSION string each time we made a change which made results of that
version of AB incomparable with previous ones. See comments in the header
of apache-1.3/src/support/ab.c.
Given that your change does that - might be proper to do so.
Dw
--
Dirk-Willem van Gulik
On 24 Apr 2002 aaron@apache.org wrote:
> aaron 02/04/24 10:09:59
>
> Modified: support ab.c
> Log:
> Major improvement in concurrent processing for AB:
> - Enable non-blocking connects.
> - Prevent quasi-blocking mode apr_recv (which would prevent AB from
> multiplexing over the entire descriptor set).
> - Catch other fatal apr_recv() errors.
>
> [This patch is slightly different than the one posted to the dev list,
> but regardless thanks to the many people who reviewed this.]
>
> Revision Changes Path
> 1.96 +16 -7 httpd-2.0/support/ab.c
>
> Index: ab.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/support/ab.c,v
> retrieving revision 1.95
> retrieving revision 1.96
> diff -u -r1.95 -r1.96
> --- ab.c 14 Apr 2002 09:21:43 -0000 1.95
> +++ ab.c 24 Apr 2002 17:09:59 -0000 1.96
> @@ -853,6 +853,10 @@
> SOCK_STREAM, c->ctx)) != APR_SUCCESS) {
> apr_err("socket", rv);
> }
> + if ((rv = apr_setsocketopt(c->aprsock, APR_SO_NONBLOCK, 1))
> + != APR_SUCCESS) {
> + apr_err("socket nonblock", rv);
> + }
> c->start = apr_time_now();
> if ((rv = apr_connect(c->aprsock, destsa)) != APR_SUCCESS) {
> if (APR_STATUS_IS_EINPROGRESS(rv)) {
> @@ -941,16 +945,21 @@
> char respcode[4]; /* 3 digits and null */
>
> r = sizeof(buffer);
> - apr_setsocketopt(c->aprsock, APR_SO_TIMEOUT, aprtimeout);
> status = apr_recv(c->aprsock, buffer, &r);
> - if (r == 0 || (status != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(status))) {
> + if (APR_STATUS_IS_EAGAIN(status))
> + return;
> + else if (r == 0 && APR_STATUS_IS_EOF(status)) {
> good++;
> close_connection(c);
> return;
> }
> -
> - if (APR_STATUS_IS_EAGAIN(status))
> - return;
> + /* catch legitimate fatal apr_recv errors */
> + else if (status != APR_SUCCESS) {
> + err_except++; /* XXX: is this the right error counter? */
> + /* XXX: Should errors here be fatal, or should we allow a
> + * certain number of them before completely failing? -aaron */
> + apr_err("apr_recv", status);
> + }
>
> totalread += r;
> if (c->read == 0) {
> @@ -1302,14 +1311,14 @@
> static void copyright(void)
> {
> if (!use_html) {
> - printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.95 $> apache-2.0");
> + printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.96 $> 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><%s></i> apache-2.0<br>\n", AP_SERVER_BASEREVISION, "$Revision: 1.95 $");
> + printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AP_SERVER_BASEREVISION, "$Revision: 1.96 $");
> 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");
>
>
>
>
Re: cvs commit: httpd-2.0/support ab.c
Posted by di...@covalent.net.
On Wed, 24 Apr 2002, Aaron Bannert wrote:
> Hmm..I don't see the VERSION symbol in the 2.0 version, and it looks
> like the comments in the header stop at Version 1.3e. I could start
> up at 2.0a, but would it be of much use to mention what has happened in
> the mean time? Also, I think we depend on the RCS Tags now for printing
> out the version string and whatnot.
*PLEASE* just add one; RCS tags may still be de different even though
results are comaprable (assuming settings are not changed). Feel free to
start as 2.0.a or something.
Dw
Re: cvs commit: httpd-2.0/support ab.c
Posted by Aaron Bannert <aa...@clove.org>.
On Wed, Apr 24, 2002 at 07:13:59PM +0200, dirkx@covalent.net wrote:
>
> Aaron,
>
> Could you also ++i the version number ? I.e. in the past we changed the
> VERSION string each time we made a change which made results of that
> version of AB incomparable with previous ones. See comments in the header
> of apache-1.3/src/support/ab.c.
>
> Given that your change does that - might be proper to do so.
Hmm..I don't see the VERSION symbol in the 2.0 version, and it looks
like the comments in the header stop at Version 1.3e. I could start
up at 2.0a, but would it be of much use to mention what has happened in
the mean time? Also, I think we depend on the RCS Tags now for printing
out the version string and whatnot.
-aaron