You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2013/10/01 13:52:38 UTC
svn commit: r1528053 - in /httpd/httpd/branches/2.4.x: ./ CHANGES
docs/manual/ docs/manual/programs/ab.xml support/ab.c
Author: jim
Date: Tue Oct 1 11:52:38 2013
New Revision: 1528053
URL: http://svn.apache.org/r1528053
Log:
Merge r1488644 from trunk:
Add a new -l parameter in order not to check the length of the responses. This can be usefull with dynamic pages.
PR9945, PR27888, PR42040
Submitted by: jailletc36
Reviewed/backported by: jim
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/CHANGES
httpd/httpd/branches/2.4.x/docs/manual/ (props changed)
httpd/httpd/branches/2.4.x/docs/manual/programs/ab.xml
httpd/httpd/branches/2.4.x/support/ab.c
Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1488644
Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1528053&r1=1528052&r2=1528053&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Tue Oct 1 11:52:38 2013
@@ -2,6 +2,10 @@
Changes with Apache 2.4.7
+ *) ab: Add a new -l parameter in order not to check the length of the responses.
+ This can be usefull with dynamic pages.
+ PR9945, PR27888, PR42040 [<ccikrs1 cranbrook edu>]
+
*) Suppress formatting of startup messages written to the console when
ErrorLogFormat is used. [Jeff Trawick]
Propchange: httpd/httpd/branches/2.4.x/docs/manual/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk/docs/manual:r1488644
Modified: httpd/httpd/branches/2.4.x/docs/manual/programs/ab.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/programs/ab.xml?rev=1528053&r1=1528052&r2=1528053&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/programs/ab.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/programs/ab.xml Tue Oct 1 11:52:38 2013
@@ -49,6 +49,7 @@
[ -<strong>H</strong> <var>custom-header</var> ]
[ -<strong>i</strong> ]
[ -<strong>k</strong> ]
+ [ -<strong>l</strong> ]
[ -<strong>n</strong> <var>requests</var> ]
[ -<strong>p</strong> <var>POST-file</var> ]
[ -<strong>P</strong> <var>proxy-auth-username</var>:<var>password</var> ]
@@ -127,6 +128,11 @@
<dd>Enable the HTTP KeepAlive feature, <em>i.e.</em>, perform multiple
requests within one HTTP session. Default is no KeepAlive.</dd>
+ <dt><code>-l</code></dt>
+ <dd>Do not report errors if the length of the responses is not constant. This
+ can be usefull for dynamic pages.
+ </dd>
+
<dt><code>-n <var>requests</var></code></dt>
<dd>Number of requests to perform for the benchmarking session. The default
is to just perform a single request which usually leads to
Modified: httpd/httpd/branches/2.4.x/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/support/ab.c?rev=1528053&r1=1528052&r2=1528053&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/support/ab.c (original)
+++ httpd/httpd/branches/2.4.x/support/ab.c Tue Oct 1 11:52:38 2013
@@ -273,6 +273,7 @@ int requests = 1; /* Number of req
int heartbeatres = 100; /* How often do we say we're alive */
int concurrency = 1; /* Number of multiple requests to make */
int percentile = 1; /* Show percentile served */
+int nolength = 0; /* Accept variable document length */
int confidence = 1; /* Show confidence estimator and warnings */
int tlimit = 0; /* time limit in secs */
int keepalive = 0; /* try and do keepalive connections */
@@ -781,7 +782,10 @@ static void output_results(int sig)
#endif
printf("\n");
printf("Document Path: %s\n", path);
- printf("Document Length: %" APR_SIZE_T_FMT " bytes\n", doclen);
+ if (nolength)
+ printf("Document Length: Variable\n");
+ else
+ printf("Document Length: %" APR_SIZE_T_FMT " bytes\n", doclen);
printf("\n");
printf("Concurrency Level: %d\n", concurrency);
printf("Time taken for tests: %.3f seconds\n", timetaken);
@@ -1053,9 +1057,14 @@ static void output_html_results(void)
printf("<tr %s><th colspan=2 %s>Document Path:</th>"
"<td colspan=2 %s>%s</td></tr>\n",
trstring, tdstring, tdstring, path);
- printf("<tr %s><th colspan=2 %s>Document Length:</th>"
- "<td colspan=2 %s>%" APR_SIZE_T_FMT " bytes</td></tr>\n",
- trstring, tdstring, tdstring, doclen);
+ if (nolength)
+ printf("<tr %s><th colspan=2 %s>Document Length:</th>"
+ "<td colspan=2 %s>Variable</td></tr>\n",
+ trstring, tdstring, tdstring);
+ else
+ printf("<tr %s><th colspan=2 %s>Document Length:</th>"
+ "<td colspan=2 %s>%" APR_SIZE_T_FMT " bytes</td></tr>\n",
+ trstring, tdstring, tdstring, doclen);
printf("<tr %s><th colspan=2 %s>Concurrency Level:</th>"
"<td colspan=2 %s>%d</td></tr>\n",
trstring, tdstring, tdstring, concurrency);
@@ -1293,7 +1302,7 @@ static void close_connection(struct conn
/* first time here */
doclen = c->bread;
}
- else if (c->bread != doclen) {
+ else if ((c->bread != doclen) && !nolength) {
bad++;
err_length++;
}
@@ -1537,7 +1546,7 @@ static void read_connection(struct conne
/* first time here */
doclen = c->bread;
}
- else if (c->bread != doclen) {
+ else if ((c->bread != doclen) && !nolength) {
bad++;
err_length++;
}
@@ -1901,6 +1910,7 @@ static void usage(const char *progname)
fprintf(stderr, " -d Do not show percentiles served table.\n");
fprintf(stderr, " -S Do not show confidence estimators and warnings.\n");
fprintf(stderr, " -q Do not show progress when doing more than 150 requests\n");
+ fprintf(stderr, " -l Accept variable document length (use this for dynamic pages)\n");
fprintf(stderr, " -g filename Output collected data to gnuplot format file.\n");
fprintf(stderr, " -e filename Output CSV file with percentages served\n");
fprintf(stderr, " -r Don't exit on socket receive errors.\n");
@@ -2085,7 +2095,7 @@ int main(int argc, const char * const ar
myhost = NULL; /* 0.0.0.0 or :: */
apr_getopt_init(&opt, cntxt, argc, argv);
- while ((status = apr_getopt(opt, "n:c:t:s:b:T:p:u:v:rkVhwix:y:z:C:H:P:A:g:X:de:SqB:"
+ while ((status = apr_getopt(opt, "n:c:t:s:b:T:p:u:v:lrkVhwix:y:z:C:H:P:A:g:X:de:SqB:"
#ifdef USE_SSL
"Z:f:"
#endif
@@ -2147,6 +2157,9 @@ int main(int argc, const char * const ar
method = PUT;
send_body = 1;
break;
+ case 'l':
+ nolength = 1;
+ break;
case 'r':
recverrok = 1;
break;