ASF Bugzilla – Attachment 10937 Details for
Bug 27888
apachebench reports length errors for dynamic pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
adds variable document length command-line option to apachebench
src.support.ab-nolength.patch (text/plain), 2.36 KB, created by
ccikrs1
on 2004-03-24 02:17:03 UTC
(
hide
)
Description:
adds variable document length command-line option to apachebench
Filename:
MIME Type:
Creator:
ccikrs1
Created:
2004-03-24 02:17:03 UTC
Size:
2.36 KB
patch
obsolete
>--- ab2.c 2004-03-24 03:33:40.000000000 +0100 >+++ ab.c 2004-03-24 03:57:12.000000000 +0100 >@@ -270,6 +270,7 @@ > char *tdstring; > > int doclen = 0; /* the length the document should be */ >+int nolength = 0; /* Accept variable document length */ > long totalread = 0; /* total number of bytes read */ > long totalbread = 0; /* totoal amount of entity body read */ > long totalposted = 0; /* total number of bytes posted, inc. headers */ >@@ -528,7 +529,10 @@ > printf("Server Port: %d\n", port); > printf("\n"); > printf("Document Path: %s\n", path); >- printf("Document Length: %d bytes\n", doclen); >+ if (nolength) >+ printf("Document Length: Variable\n"); >+ else >+ printf("Document Length: %d bytes\n", doclen); > printf("\n"); > printf("Concurrency Level: %d\n", concurrency); > printf("Time taken for tests: %ld.%03ld seconds\n", >@@ -965,7 +969,7 @@ > /* first time here */ > doclen = c->bread; > } >- else if (c->bread != doclen) { >+ else if ((c->bread != doclen) && !nolength) { > bad++; > err_length++; > } >@@ -1152,7 +1156,7 @@ > /* first time here */ > doclen = c->bread; > } >- else if (c->bread != doclen) { >+ else if ((c->bread != doclen) && !nolength) { > bad++; > err_length++; > } >@@ -1387,6 +1391,7 @@ > fprintf(stderr, " -p postfile File containg data to POST\n"); > fprintf(stderr, " -T content-type Content-type header for POSTing\n"); > fprintf(stderr, " -v verbosity How much troubleshooting info to print\n"); >+ fprintf(stderr, " -L Accept variable document length (use this for dynamic pages)\n"); > fprintf(stderr, " -w Print out results in HTML tables\n"); > fprintf(stderr, " -i Use HEAD instead of GET\n"); > fprintf(stderr, " -x attributes String to insert as table attributes\n"); >@@ -1515,7 +1520,7 @@ > hdrs[0] = '\0'; > proxyhost[0] = '\0'; > optind = 1; >- while ((c = getopt(argc, argv, "n:c:t:T:p:v:kVhwix:y:z:C:H:P:A:g:X:de:Sq" >+ while ((c = getopt(argc, argv, "n:c:t:T:p:v:LkVhwix:y:z:C:H:P:A:g:X:de:Sq" > #ifdef USE_SSL > "s" > #endif >@@ -1573,6 +1578,9 @@ > case 'v': > verbosity = atoi(optarg); > break; >+ case 'L': >+ nolength = 1; >+ break; > case 't': > tlimit = atoi(optarg); > requests = MAX_REQUESTS; /* need to size data array on
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 27888
: 10937