From 353bf6e950c0d1ffcf78ed5b4007b45de44596fa Mon Sep 17 00:00:00 2001 From: Dirk-Willem van Gulik Date: Thu, 25 Apr 2002 08:31:13 +0000 Subject: [PATCH] During the 1.3->2.0 migragrion; ab its #defined VERSION own string was replaced by that of the base server distribution it sits in. Propably by accident. This is propably not a good idea - as ideally one would like to be able to compare ab runs as much as possible - even across releases of apache 2.0 - assuming ab or the dependent APR has not changed (note to self: we do not track APR in our version structure). This commit decouples the version strings for now. Though the actual value may be nicely confusing. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94792 13f79535-47bb-0310-9956-ffa450edef68 --- support/ab.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/support/ab.c b/support/ab.c index 1a9aa78955..5aede6e5c8 100644 --- a/support/ab.c +++ b/support/ab.c @@ -109,8 +109,24 @@ ** is now treated as fatal. ** Contributed by Aaron Bannert, April 24, 2002 ** - */ - + ** Version 2.0.36-dev2 + ** Internalized the version string - this string is part + ** of the Agent: header and the result output. + ** + **/ +#define AP_AB_BASEREVISION "2.0.36-dev2" /* Note: this version + string should start with \d+[\d\.]* and be a valid + string for an HTTP Agent: header when prefixed with + 'ApacheBench/'. + + It should reflect the version of AB - and not that of + the apache server it happens to accompany. And it should + be updated or changed whenever the results are no longer + fundamentally comparable to the results of a previous + version of ab. Either due to a change in the logic of + ab - or to due to a change in the distribution it is + compiled with (such as an APR change in for example blocking). + */ /* * BUGS: * @@ -1172,7 +1188,7 @@ static void test(void) "%s" "\r\n", (posting == 0) ? "GET" : "HEAD", (isproxy) ? fullurl : path, - AP_SERVER_BASEREVISION, + AP_AB_BASEREVISION, keepalive ? "Connection: Keep-Alive\r\n" : "", cookie, auth, host_field, colonhost, hdrs); } @@ -1187,7 +1203,7 @@ static void test(void) "%s" "\r\n", (isproxy) ? fullurl : path, - AP_SERVER_BASEREVISION, + AP_AB_BASEREVISION, keepalive ? "Connection: Keep-Alive\r\n" : "", cookie, auth, host_field, colonhost, postlen, @@ -1319,14 +1335,14 @@ static void test(void) static void copyright(void) { if (!use_html) { - printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.97 $> apache-2.0"); + printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1.98 $> 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("

\n"); - printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AP_SERVER_BASEREVISION, "$Revision: 1.97 $"); + printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AP_AB_BASEREVISION, "$Revision: 1.98 $"); 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

\n"); -- 2.40.0