ASF Bugzilla – Attachment 22229 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]
Allow gnuplot and csv in combination with html output
ab.c-html_gnuplot_csv-6.patch (text/plain), 4.00 KB, created by
Rainer Jung
on 2008-07-07 10:55:34 UTC
(
hide
)
Description:
Allow gnuplot and csv in combination with html output
Filename:
MIME Type:
Creator:
Rainer Jung
Created:
2008-07-07 10:55:34 UTC
Size:
4.00 KB
patch
obsolete
>--- ab.c-html_sigs-5 2008-07-07 16:32:24.000000000 +0200 >+++ ab.c-html_gnuplot_csv-6 2008-07-07 16:39:35.000000000 +0200 >@@ -722,6 +722,52 @@ > return 0; > } > >+static void output_csvperc() >+{ >+ int i; >+ FILE *out = fopen(csvperc, "w"); >+ if (!out) { >+ perror("Cannot open CSV output file"); >+ exit(1); >+ } >+ fprintf(out, "" "Percentage served" "," "Time in ms" "\n"); >+ for (i = 0; i < 100; i++) { >+ double t; >+ if (i == 0) >+ t = ap_double_ms(stats[0].time); >+ else if (i == 100) >+ t = ap_double_ms(stats[done - 1].time); >+ else >+ t = ap_double_ms(stats[(int) (0.5 + done * i / 100.0)].time); >+ fprintf(out, "%d,%.3f\n", i, t); >+ } >+ fclose(out); >+} >+ >+static void output_gnuplot() >+{ >+ int i; >+ FILE *out = fopen(gnuplot, "w"); >+ char tmstring[APR_CTIME_LEN]; >+ if (!out) { >+ perror("Cannot open gnuplot output file"); >+ exit(1); >+ } >+ fprintf(out, "starttime\tseconds\tctime\tdtime\tttime\twait\n"); >+ for (i = 0; i < done; i++) { >+ (void) apr_ctime(tmstring, stats[i].starttime); >+ fprintf(out, "%s\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT >+ "\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT >+ "\t%" APR_TIME_T_FMT "\n", tmstring, >+ apr_time_sec(stats[i].starttime), >+ ap_round_ms(stats[i].ctime), >+ ap_round_ms(stats[i].time - stats[i].ctime), >+ ap_round_ms(stats[i].time), >+ ap_round_ms(stats[i].waittime)); >+ } >+ fclose(out); >+} >+ > static void output_results(int sig) > { > double timetaken; >@@ -930,7 +976,6 @@ > #undef CONF_FMT_STRING > } > >- > /* Sorted on total connect times */ > if (percentile && (done > 1)) { > printf("\nPercentage of the requests served within a certain time (ms)\n"); >@@ -945,45 +990,12 @@ > ap_round_ms(stats[(int) (done * percs[i] / 100)].time)); > } > } >+ > if (csvperc) { >- FILE *out = fopen(csvperc, "w"); >- if (!out) { >- perror("Cannot open CSV output file"); >- exit(1); >- } >- fprintf(out, "" "Percentage served" "," "Time in ms" "\n"); >- for (i = 0; i < 100; i++) { >- double t; >- if (i == 0) >- t = ap_double_ms(stats[0].time); >- else if (i == 100) >- t = ap_double_ms(stats[done - 1].time); >- else >- t = ap_double_ms(stats[(int) (0.5 + done * i / 100.0)].time); >- fprintf(out, "%d,%.3f\n", i, t); >- } >- fclose(out); >+ output_csvperc(); > } > if (gnuplot) { >- FILE *out = fopen(gnuplot, "w"); >- char tmstring[APR_CTIME_LEN]; >- if (!out) { >- perror("Cannot open gnuplot output file"); >- exit(1); >- } >- fprintf(out, "starttime\tseconds\tctime\tdtime\tttime\twait\n"); >- for (i = 0; i < done; i++) { >- (void) apr_ctime(tmstring, stats[i].starttime); >- fprintf(out, "%s\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT >- "\t%" APR_TIME_T_FMT "\t%" APR_TIME_T_FMT >- "\t%" APR_TIME_T_FMT "\n", tmstring, >- apr_time_sec(stats[i].starttime), >- ap_round_ms(stats[i].ctime), >- ap_round_ms(stats[i].time - stats[i].ctime), >- ap_round_ms(stats[i].time), >- ap_round_ms(stats[i].waittime)); >- } >- fclose(out); >+ output_gnuplot(); > } > } > >@@ -1155,7 +1167,15 @@ > #undef CONF_FMT_STRING > } > printf("</table>\n"); >+ >+ if (csvperc) { >+ output_csvperc(); >+ } >+ if (gnuplot) { >+ output_gnuplot(); >+ } > } >+ > if (sig) { > exit(1); > }
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