Loading support/ab.c +35 −34 Original line number Diff line number Diff line Loading @@ -549,7 +549,7 @@ static void output_results(void) sdd += a * a; a = (s.waittime - totalwait); sdwait += a * a; }; } sdtot = (requests > 1) ? sqrt(sdtot / (requests - 1)) : 0; sdcon = (requests > 1) ? sqrt(sdcon / (requests - 1)) : 0; Loading @@ -564,7 +564,7 @@ static void output_results(void) if (!out) { perror("Cannot open gnuplot output file"); exit(1); }; } fprintf(out, "starttime\tseconds\tctime\tdtime\tttime\twait\n"); for (i = 0; i < requests; i++) { sttime = stats[i].starttime; Loading @@ -581,9 +581,9 @@ static void output_results(void) stats[i].waittime); } fclose(out); }; } /* * XXX: what is better; this hideous cast of the copare function; or * XXX: what is better; this hideous cast of the compradre function; or * the four warnings during compile ? dirkx just does not know and * hates both/ */ Loading Loading @@ -650,12 +650,13 @@ static void output_results(void) else { printf(" min avg max\n"); #define CONF_FMT_STRING "%5" APR_TIME_T_FMT " %5e %5" APR_TIME_T_FMT "\n" printf("Connect: " CONF_FMT_STRING, mincon, totalcon / requests, maxcon); printf("Connect: " CONF_FMT_STRING, mincon, totalcon / requests, maxcon); printf("Processing: " CONF_FMT_STRING, mintot - mincon, (total / requests) - (totalcon / requests), maxtot - maxcon); printf("Total: " CONF_FMT_STRING, mintot, total / requests, maxtot); (total / requests) - (totalcon / requests), maxtot - maxcon); printf("Total: " CONF_FMT_STRING, mintot, total / requests, maxtot); #undef CONF_FMT_STRING } Loading @@ -670,16 +671,16 @@ static void output_results(void) printf(" 100%% %5" APR_TIME_T_FMT " (longest request)\n", stats[requests - 1].time); else printf(" %d%% %5" APR_TIME_T_FMT "\n", percs[i], stats[(int) (requests * percs[i] / 100)].time); }; printf(" %d%% %5" APR_TIME_T_FMT "\n", percs[i], stats[(int) (requests * percs[i] / 100)].time); } if (csvperc) { FILE *out = fopen(csvperc, "w"); int i; 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 d; Loading @@ -692,7 +693,7 @@ static void output_results(void) fprintf(out, "%d,%e\n", i, d); } fclose(out); }; } } } Loading Loading @@ -951,7 +952,7 @@ static void read_connection(struct connection * c) totalread += r; if (c->read == 0) { c->beginread = apr_time_now(); }; } c->read += r; Loading Loading @@ -1291,14 +1292,14 @@ static void test(void) static void copyright(void) { if (!use_html) { printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.75 $> apache-2.0"); printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.76 $> apache-2.0"); printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n"); printf("Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/\n"); printf("\n"); } else { printf("<p>\n"); printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.75 $"); printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.76 $"); printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n"); printf(" Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/<br>\n"); printf("</p>\n<p>\n"); Loading Loading @@ -1606,7 +1607,7 @@ int main(int argc, const char *const argv[]) *p = '\0'; p++; proxyport = atoi(p); }; } strcpy(proxyhost, optarg); isproxy = 1; } Loading Loading
support/ab.c +35 −34 Original line number Diff line number Diff line Loading @@ -549,7 +549,7 @@ static void output_results(void) sdd += a * a; a = (s.waittime - totalwait); sdwait += a * a; }; } sdtot = (requests > 1) ? sqrt(sdtot / (requests - 1)) : 0; sdcon = (requests > 1) ? sqrt(sdcon / (requests - 1)) : 0; Loading @@ -564,7 +564,7 @@ static void output_results(void) if (!out) { perror("Cannot open gnuplot output file"); exit(1); }; } fprintf(out, "starttime\tseconds\tctime\tdtime\tttime\twait\n"); for (i = 0; i < requests; i++) { sttime = stats[i].starttime; Loading @@ -581,9 +581,9 @@ static void output_results(void) stats[i].waittime); } fclose(out); }; } /* * XXX: what is better; this hideous cast of the copare function; or * XXX: what is better; this hideous cast of the compradre function; or * the four warnings during compile ? dirkx just does not know and * hates both/ */ Loading Loading @@ -650,12 +650,13 @@ static void output_results(void) else { printf(" min avg max\n"); #define CONF_FMT_STRING "%5" APR_TIME_T_FMT " %5e %5" APR_TIME_T_FMT "\n" printf("Connect: " CONF_FMT_STRING, mincon, totalcon / requests, maxcon); printf("Connect: " CONF_FMT_STRING, mincon, totalcon / requests, maxcon); printf("Processing: " CONF_FMT_STRING, mintot - mincon, (total / requests) - (totalcon / requests), maxtot - maxcon); printf("Total: " CONF_FMT_STRING, mintot, total / requests, maxtot); (total / requests) - (totalcon / requests), maxtot - maxcon); printf("Total: " CONF_FMT_STRING, mintot, total / requests, maxtot); #undef CONF_FMT_STRING } Loading @@ -670,16 +671,16 @@ static void output_results(void) printf(" 100%% %5" APR_TIME_T_FMT " (longest request)\n", stats[requests - 1].time); else printf(" %d%% %5" APR_TIME_T_FMT "\n", percs[i], stats[(int) (requests * percs[i] / 100)].time); }; printf(" %d%% %5" APR_TIME_T_FMT "\n", percs[i], stats[(int) (requests * percs[i] / 100)].time); } if (csvperc) { FILE *out = fopen(csvperc, "w"); int i; 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 d; Loading @@ -692,7 +693,7 @@ static void output_results(void) fprintf(out, "%d,%e\n", i, d); } fclose(out); }; } } } Loading Loading @@ -951,7 +952,7 @@ static void read_connection(struct connection * c) totalread += r; if (c->read == 0) { c->beginread = apr_time_now(); }; } c->read += r; Loading Loading @@ -1291,14 +1292,14 @@ static void test(void) static void copyright(void) { if (!use_html) { printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.75 $> apache-2.0"); printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.76 $> apache-2.0"); printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n"); printf("Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/\n"); printf("\n"); } else { printf("<p>\n"); printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.75 $"); printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.76 $"); printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n"); printf(" Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/<br>\n"); printf("</p>\n<p>\n"); Loading Loading @@ -1606,7 +1607,7 @@ int main(int argc, const char *const argv[]) *p = '\0'; p++; proxyport = atoi(p); }; } strcpy(proxyhost, optarg); isproxy = 1; } Loading