View | Details | Raw Unified | Return to bug 50644
Collapse All | Expand All

(-)ab.c.orig (-1 / +15 lines)
Lines 243-248 Link Here
243
    char cbuff[CBUFFSIZE];      /* a buffer to store server response header */
243
    char cbuff[CBUFFSIZE];      /* a buffer to store server response header */
244
    int cbx;                    /* offset in cbuffer */
244
    int cbx;                    /* offset in cbuffer */
245
    int keepalive;              /* non-zero if a keep-alive request */
245
    int keepalive;              /* non-zero if a keep-alive request */
246
    int kasent;                 /* keep-alive requests sent by this connection */
246
    int gotheader;              /* non-zero if we have the entire header in
247
    int gotheader;              /* non-zero if we have the entire header in
247
                                 * cbuff */
248
                                 * cbuff */
248
    apr_time_t start,           /* Start of connection */
249
    apr_time_t start,           /* Start of connection */
Lines 282-287 Link Here
282
int confidence = 1;     /* Show confidence estimator and warnings */
283
int confidence = 1;     /* Show confidence estimator and warnings */
283
int tlimit = 0;         /* time limit in secs */
284
int tlimit = 0;         /* time limit in secs */
284
int keepalive = 0;      /* try and do keepalive connections */
285
int keepalive = 0;      /* try and do keepalive connections */
286
int maxkarequests = 0;  /* max requests to send per keep-alive connection */
285
int windowsize = 0;     /* we use the OS default window size */
287
int windowsize = 0;     /* we use the OS default window size */
286
char servername[1024];  /* name that server reports */
288
char servername[1024];  /* name that server reports */
287
char *hostname;         /* host name from URL */
289
char *hostname;         /* host name from URL */
Lines 1154-1159 Link Here
1154
    c->read = 0;
1156
    c->read = 0;
1155
    c->bread = 0;
1157
    c->bread = 0;
1156
    c->keepalive = 0;
1158
    c->keepalive = 0;
1159
    c->kasent = 0;
1157
    c->cbx = 0;
1160
    c->cbx = 0;
1158
    c->gotheader = 0;
1161
    c->gotheader = 0;
1159
    c->rwrite = 0;
1162
    c->rwrite = 0;
Lines 1516-1521 Link Here
1516
            bad++;
1519
            bad++;
1517
            err_length++;
1520
            err_length++;
1518
        }
1521
        }
1522
        /* implement max requests per keep-alive connection */
1523
        c->kasent++;
1524
        if ( keepalive && maxkarequests && c->kasent == maxkarequests ) {
1525
            doneka++;
1526
            close_connection(c);
1527
            return;
1528
        } else
1519
        if (done < requests) {
1529
        if (done < requests) {
1520
            struct data *s = &stats[done++];
1530
            struct data *s = &stats[done++];
1521
            doneka++;
1531
            doneka++;
Lines 1868-1873 Link Here
1868
    fprintf(stderr, "    -X proxy:port   Proxyserver and port number to use\n");
1878
    fprintf(stderr, "    -X proxy:port   Proxyserver and port number to use\n");
1869
    fprintf(stderr, "    -V              Print version number and exit\n");
1879
    fprintf(stderr, "    -V              Print version number and exit\n");
1870
    fprintf(stderr, "    -k              Use HTTP KeepAlive feature\n");
1880
    fprintf(stderr, "    -k              Use HTTP KeepAlive feature\n");
1881
    fprintf(stderr, "    -m count        Maximum of requests per KeepAlive connection\n");
1871
    fprintf(stderr, "    -d              Do not show percentiles served table.\n");
1882
    fprintf(stderr, "    -d              Do not show percentiles served table.\n");
1872
    fprintf(stderr, "    -S              Do not show confidence estimators and warnings.\n");
1883
    fprintf(stderr, "    -S              Do not show confidence estimators and warnings.\n");
1873
    fprintf(stderr, "    -g filename     Output collected data to gnuplot format file.\n");
1884
    fprintf(stderr, "    -g filename     Output collected data to gnuplot format file.\n");
Lines 2040-2046 Link Here
2040
#endif
2051
#endif
2041
2052
2042
    apr_getopt_init(&opt, cntxt, argc, argv);
2053
    apr_getopt_init(&opt, cntxt, argc, argv);
2043
    while ((status = apr_getopt(opt, "n:c:t:b:T:p:u:v:rkVhwix:y:z:C:H:P:A:g:X:de:Sq"
2054
    while ((status = apr_getopt(opt, "n:c:t:b:T:p:u:v:rkVhwix:y:z:C:H:P:A:g:X:de:Sqm:"
2044
#ifdef USE_SSL
2055
#ifdef USE_SSL
2045
            "Z:f:"
2056
            "Z:f:"
2046
#endif
2057
#endif
Lines 2055-2060 Link Here
2055
            case 'k':
2066
            case 'k':
2056
                keepalive = 1;
2067
                keepalive = 1;
2057
                break;
2068
                break;
2069
            case 'm':
2070
                maxkarequests = atoi(optarg);
2071
                break;
2058
            case 'q':
2072
            case 'q':
2059
                heartbeatres = 0;
2073
                heartbeatres = 0;
2060
                break;
2074
                break;

Return to bug 50644