You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2023/06/20 15:15:30 UTC
svn commit: r1910515 - /httpd/httpd/trunk/support/ab.c
Author: ylavic
Date: Tue Jun 20 15:15:30 2023
New Revision: 1910515
URL: http://svn.apache.org/viewvc?rev=1910515&view=rev
Log:
ab: Count keepalive aborted connections separately.
Modified:
httpd/httpd/trunk/support/ab.c
Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=1910515&r1=1910514&r2=1910515&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Tue Jun 20 15:15:30 2023
@@ -334,6 +334,7 @@ struct metrics {
int err_recv; /* requests failed due to broken read */
int err_except; /* requests failed due to exception */
int err_response; /* requests with invalid or non-200 response */
+ int aborted_ka; /* requests aborted during keepalive (no data) */
int concurrent; /* Number of multiple requests actually made */
#ifdef USE_SSL
char ssl_info[128];
@@ -1159,8 +1160,12 @@ static void output_results(void)
printf("Write errors: %d\n", metrics.epipe);
if (metrics.err_response)
printf("Non-2xx responses: %d\n", metrics.err_response);
- if (keepalive)
+ if (keepalive) {
printf("Keep-Alive requests: %" APR_INT64_T_FMT "\n", metrics.doneka);
+ if (metrics.aborted_ka) {
+ printf("Keep-Alive aborts: %d\n", metrics.aborted_ka);
+ }
+ }
printf("Total transferred: %" APR_INT64_T_FMT " bytes\n", metrics.totalread);
if (send_body)
printf("Total body sent: %" APR_INT64_T_FMT "\n", metrics.totalposted);
@@ -1736,6 +1741,7 @@ static void finalize_connection(struct c
* as per RFC7230 6.3.1, revert previous accounting (not an error).
*/
worker->metrics.doneka--;
+ worker->metrics.aborted_ka++;
}
else {
/* save out time */