ASF Bugzilla – Attachment 22227 Details for
Bug 45355
ab text and html output jumbo unification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Add missing html output
ab.c-missing_html_output-4.patch (text/plain), 6.76 KB, created by
Rainer Jung
on 2008-07-07 10:54:21 UTC
(
hide
)
Description:
Add missing html output
Filename:
MIME Type:
Creator:
Rainer Jung
Created:
2008-07-07 10:54:21 UTC
Size:
6.76 KB
patch
obsolete
>--- ab.c-proc_wait-3 2008-07-07 16:21:45.000000000 +0200 >+++ ab.c-missing_html_output-4 2008-07-07 16:28:12.000000000 +0200 >@@ -1010,6 +1010,13 @@ > printf("<tr %s><th colspan=2 %s>Server Port:</th>" > "<td colspan=2 %s>%hu</td></tr>\n", > trstring, tdstring, tdstring, port); >+#ifdef USE_SSL >+ if (is_ssl && ssl_info) { >+ printf("<tr %s><th colspan=2 %s>SSL/TLS Protocol:</th>" >+ "<td colspan=2 %s>%s</td></tr>\n", >+ trstring, tdstring, tdstring, ssl_info); >+ } >+#endif > printf("<tr %s><th colspan=2 %s>Document Path:</th>" > "<td colspan=2 %s>%s</td></tr>\n", > trstring, tdstring, tdstring, path); >@@ -1029,8 +1036,12 @@ > "<td colspan=2 %s>%d</td></tr>\n", > trstring, tdstring, tdstring, bad); > if (bad) >- printf("<tr %s><td colspan=4 %s > (Connect: %d, Length: %d, Exceptions: %d)</td></tr>\n", >- trstring, tdstring, err_conn, err_length, err_except); >+ printf("<tr %s><td colspan=4 %s > (Connect: %d, Receive: %d, Length: %d, Exceptions: %d)</td></tr>\n", >+ trstring, tdstring, err_conn, err_recv, err_length, err_except); >+ if (epipe) >+ printf("<tr %s><th colspan=2 %s>Write errors:</th>" >+ "<td colspan=2 %s>%d</td></tr>\n", >+ trstring, tdstring, tdstring, epipe); > if (err_response) > printf("<tr %s><th colspan=2 %s>Non-2xx responses:</th>" > "<td colspan=2 %s>%d</td></tr>\n", >@@ -1051,10 +1062,16 @@ > trstring, tdstring, tdstring, totalbread); > > /* avoid divide by zero */ >- if (timetaken) { >+ if (timetaken && done) { > printf("<tr %s><th colspan=2 %s>Requests per second:</th>" > "<td colspan=2 %s>%.2f</td></tr>\n", > trstring, tdstring, tdstring, (double) done / timetaken); >+ printf("<tr %s><th colspan=2 %s>Time per request:</th>" >+ "<td colspan=2 %s>%.3f [ms] (mean)</td></tr>\n", >+ trstring, tdstring, tdstring, (double) concurrency * timetaken * 1000 / done); >+ printf("<tr %s><th colspan=2 %s>Time per request:</th>" >+ "<td colspan=2 %s>%.3f [ms] (mean, across all concurrent requests)</td></tr>\n", >+ trstring, tdstring, tdstring, (double) timetaken * 1000 / done); > printf("<tr %s><th colspan=2 %s>Transfer rate:</th>" > "<td colspan=2 %s>%.2f kb/s received</td></tr>\n", > trstring, tdstring, tdstring, (double) totalread / 1024 / timetaken); >@@ -1072,50 +1089,65 @@ > { > /* work out connection times */ > int i; >- apr_interval_time_t totalcon = 0, total = 0; >- apr_interval_time_t mincon = AB_MAX, mintot = AB_MAX; >- apr_interval_time_t maxcon = 0, maxtot = 0; >+ apr_time_t totalcon = 0, total = 0, totald = 0, totalwait = 0; >+ apr_time_t meancon, meantot, meand, meanwait; >+ apr_interval_time_t mincon = AB_MAX, mintot = AB_MAX, mind = AB_MAX, >+ minwait = AB_MAX; >+ apr_interval_time_t maxcon = 0, maxtot = 0, maxd = 0, maxwait = 0; > > for (i = 0; i < done; i++) { > struct data *s = &stats[i]; > mincon = ap_min(mincon, s->ctime); > mintot = ap_min(mintot, s->time); >+ mind = ap_min(mind, s->time - s->ctime); >+ minwait = ap_min(minwait, s->waittime); >+ > maxcon = ap_max(maxcon, s->ctime); > maxtot = ap_max(maxtot, s->time); >+ maxd = ap_max(maxd, s->time - s->ctime); >+ maxwait = ap_max(maxwait, s->waittime); >+ > totalcon += s->ctime; >- total += s->time; >- } >+ total += s->time; >+ totald += s->time - s->ctime; >+ totalwait += s->waittime; >+ } >+ meancon = totalcon / done; >+ meantot = total / done; >+ meand = totald / done; >+ meanwait = totalwait / done; >+ > /* > * Reduce stats from apr time to milliseconds > */ >- mincon = ap_round_ms(mincon); >- mintot = ap_round_ms(mintot); >- maxcon = ap_round_ms(maxcon); >- maxtot = ap_round_ms(maxtot); >- totalcon = ap_round_ms(totalcon); >- total = ap_round_ms(total); >+ mincon = ap_round_ms(mincon); >+ mind = ap_round_ms(mind); >+ minwait = ap_round_ms(minwait); >+ mintot = ap_round_ms(mintot); >+ meancon = ap_round_ms(meancon); >+ meand = ap_round_ms(meand); >+ meanwait = ap_round_ms(meanwait); >+ meantot = ap_round_ms(meantot); >+ maxcon = ap_round_ms(maxcon); >+ maxd = ap_round_ms(maxd); >+ maxwait = ap_round_ms(maxwait); >+ maxtot = ap_round_ms(maxtot); > > if (done > 0) { /* avoid division by zero (if 0 done) */ > printf("<tr %s><th %s colspan=4>Connnection Times (ms)</th></tr>\n", > trstring, tdstring); > printf("<tr %s><th %s> </th> <th %s>min</th> <th %s>avg</th> <th %s>max</th></tr>\n", > trstring, tdstring, tdstring, tdstring, tdstring); >- printf("<tr %s><th %s>Connect:</th>" >- "<td %s>%5" APR_TIME_T_FMT "</td>" >- "<td %s>%5" APR_TIME_T_FMT "</td>" >- "<td %s>%5" APR_TIME_T_FMT "</td></tr>\n", >- trstring, tdstring, tdstring, mincon, tdstring, totalcon / done, tdstring, maxcon); >- printf("<tr %s><th %s>Processing:</th>" >- "<td %s>%5" APR_TIME_T_FMT "</td>" >- "<td %s>%5" APR_TIME_T_FMT "</td>" >- "<td %s>%5" APR_TIME_T_FMT "</td></tr>\n", >- trstring, tdstring, tdstring, mintot - mincon, tdstring, >- (total / done) - (totalcon / done), tdstring, maxtot - maxcon); >- printf("<tr %s><th %s>Total:</th>" >- "<td %s>%5" APR_TIME_T_FMT "</td>" >- "<td %s>%5" APR_TIME_T_FMT "</td>" >- "<td %s>%5" APR_TIME_T_FMT "</td></tr>\n", >- trstring, tdstring, tdstring, mintot, tdstring, total / done, tdstring, maxtot); >+#define CONF_FMT_STRING "<td %s>%5" APR_TIME_T_FMT "</td><td %s>%5" APR_TIME_T_FMT "</td><td %s>%5" APR_TIME_T_FMT "</td></tr>\n" >+ printf("<tr %s><th %s>Connect:</th>" CONF_FMT_STRING, >+ trstring, tdstring, tdstring, mincon, tdstring, meancon, tdstring, maxcon); >+ printf("<tr %s><th %s>Processing:</th>" CONF_FMT_STRING, >+ trstring, tdstring, tdstring, mind, tdstring, meand, tdstring, maxd); >+ printf("<tr %s><th %s>Waiting:</th>" CONF_FMT_STRING, >+ trstring, tdstring, tdstring, minwait, tdstring, meanwait, tdstring, maxwait); >+ printf("<tr %s><th %s>Total:</th>" CONF_FMT_STRING, >+ trstring, tdstring, tdstring, mintot, tdstring, meantot, tdstring, maxtot); >+#undef CONF_FMT_STRING > } > printf("</table>\n"); > }
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 45355
:
22224
|
22225
|
22226
| 22227 |
22228
|
22229
|
22230
|
22231