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/01/08 15:25:15 UTC
svn commit: r1430300 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS
docs/manual/ docs/manual/programs/ab.xml support/ab.c
Author: jim
Date: Tue Jan 8 14:25:15 2013
New Revision: 1430300
URL: http://svn.apache.org/viewvc?rev=1430300&view=rev
Log:
Merge r1422937 from trunk:
ab: add the possibility to define a socket timeout (-s timeout)
[Guido Serra <zeph fsfe org>]
Also some changes In usage():
- reword -t option to be more clear with the new -s
- add missing -q
- add the new -s option
- reword some options to better match online documentation
ab.xml claimed that -s was already there, but nothing in the code looks like that.
So, I guess it only landed on the online doc...
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/STATUS
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:r1422937
Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1430300&r1=1430299&r2=1430300&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Tue Jan 8 14:25:15 2013
@@ -2,8 +2,11 @@
Changes with Apache 2.4.4
- *) httxt2dbm: Correct length computation for the 'value' stored in the DBM file
- PR 47650 [jon buckybox com]
+ *) ab: Support socket timeout (-s timeout).
+ [Guido Serra <zeph fsfe org>]
+
+ *) httxt2dbm: Correct length computation for the 'value' stored in the
+ DBM file. PR 47650 [jon buckybox com]
*) core: Be more correct about rejecting directives that cannot work in <If>
sections. [Stefan Fritsch]
Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1430300&r1=1430299&r2=1430300&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Tue Jan 8 14:25:15 2013
@@ -91,12 +91,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
-
- * support/ab: add the possibility to define a socket timeout (-s timeout)
- [Guido Serra <zeph fsfe org>]
- trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1422937
- 2.4.x patch: trunk patch works + CHANGES to be added
- +1: jailletc36, jorton, humbedooh
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
Propchange: httpd/httpd/branches/2.4.x/docs/manual/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk/docs/manual:r1422937
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=1430300&r1=1430299&r2=1430300&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 Jan 8 14:25:15 2013
@@ -54,7 +54,7 @@
[ -<strong>P</strong> <var>proxy-auth-username</var>:<var>password</var> ]
[ -<strong>q</strong> ]
[ -<strong>r</strong> ]
- [ -<strong>s</strong> ]
+ [ -<strong>s</strong> <var>timeout</var> ]
[ -<strong>S</strong> ]
[ -<strong>t</strong> <var>timelimit</var> ]
[ -<strong>T</strong> <var>content-type</var> ]
@@ -150,11 +150,9 @@
<dt><code>-r</code></dt>
<dd>Don't exit on socket receive errors.</dd>
- <dt><code>-s</code></dt>
- <dd>When compiled in (<code>ab -h</code> will show you) use the SSL
- protected <code>https</code> rather than the <code>http</code> protocol.
- This feature is experimental and <em>very</em> rudimentary. You probably
- do not want to use it.</dd>
+ <dt><code>-s <var>timeout</var></code></dt>
+ <dd>Maximum number of seconds to wait before the socket times out.
+ Default is 30 seconds.</dd>
<dt><code>-S</code></dt>
<dd>Do not display the median and standard deviation values, nor display
@@ -170,7 +168,7 @@
<dt><code>-T <var>content-type</var></code></dt>
<dd>Content-type header to use for POST/PUT data, eg.
<code>application/x-www-form-urlencoded</code>.
- Default: <code>text/plain</code>.</dd>
+ Default is <code>text/plain</code>.</dd>
<dt><code>-u <var>PUT-file</var></code></dt>
<dd>File containing data to PUT. Remember to also set <code>-T</code>.</dd>
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=1430300&r1=1430299&r2=1430300&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/support/ab.c (original)
+++ httpd/httpd/branches/2.4.x/support/ab.c Tue Jan 8 14:25:15 2013
@@ -1872,13 +1872,16 @@ static void usage(const char *progname)
*/
fprintf(stderr, "Options are:\n");
fprintf(stderr, " -n requests Number of requests to perform\n");
- fprintf(stderr, " -c concurrency Number of multiple requests to make\n");
- fprintf(stderr, " -t timelimit Seconds to max. wait for responses\n");
+ fprintf(stderr, " -c concurrency Number of multiple requests to make at a time\n");
+ fprintf(stderr, " -t timelimit Seconds to max. to spend on benchmarking\n");
+ fprintf(stderr, " This implies -n 50000\n");
+ fprintf(stderr, " -s timeout Seconds to max. wait for each response\n");
+ fprintf(stderr, " Default is 30 seconds\n");
fprintf(stderr, " -b windowsize Size of TCP send/receive buffer, in bytes\n");
fprintf(stderr, " -B address Address to bind to when making outgoing connections\n");
fprintf(stderr, " -p postfile File containing data to POST. Remember also to set -T\n");
fprintf(stderr, " -u putfile File containing data to PUT. Remember also to set -T\n");
- fprintf(stderr, " -T content-type Content-type header for POSTing, eg.\n");
+ fprintf(stderr, " -T content-type Content-type header to use for POST/PUT data, eg.\n");
fprintf(stderr, " 'application/x-www-form-urlencoded'\n");
fprintf(stderr, " Default is 'text/plain'\n");
fprintf(stderr, " -v verbosity How much troubleshooting info to print\n");
@@ -1899,6 +1902,7 @@ static void usage(const char *progname)
fprintf(stderr, " -k Use HTTP KeepAlive feature\n");
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, " -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");
@@ -2083,7 +2087,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: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:rkVhwix:y:z:C:H:P:A:g:X:de:SqB:"
#ifdef USE_SSL
"Z:f:"
#endif
@@ -2124,6 +2128,9 @@ int main(int argc, const char * const ar
case 'S':
confidence = 0;
break;
+ case 's':
+ aprtimeout = apr_time_from_sec(atoi(opt_arg)); /* timeout value */
+ break;
case 'p':
if (method != NO_METH)
err("Cannot mix POST with other methods\n");