https://issues.apache.org/bugzilla/show_bug.cgi?id=44931
Summary: Misleading use of "seconds" in Apache Bench (instead of
"microseconds")
Product: Apache httpd-2
Version: 2.3-HEAD
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Other Modules
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Hi,
when Apache Bench is used with the -g option ("output a gnuplot file"), the
second colon is named "seconds". But it contains data of type apr_time_t, which
is the "number of microseconds since 00:00:00 january 1, 1970 UTC" (according
to
[http://apr.apache.org/docs/apr/0.9/group__apr__time.html#gdb4bde16055748190eae190c55aa02bb]).
Moreover, there is a comment at the begining of ab.c indicating "seconds"
instead of "microseconds" too.
I propose the following patch:
*** ab.c 2008-05-05 08:21:52.000000000 +0200
--- ab.c.orig 2008-05-05 08:21:00.000000000 +0200
***************
*** 239,245 ****
struct data {
int read; /* number of bytes read */
! apr_time_t starttime; /* start time of connection in microseconds since
* Jan. 1, 1970 */
apr_interval_time_t waittime; /* Between writing request and reading
* response */
--- 239,245 ----
struct data {
int read; /* number of bytes read */
! apr_time_t starttime; /* start time of connection in seconds since
* Jan. 1, 1970 */
apr_interval_time_t waittime; /* Between writing request and reading
* response */
***************
*** 844,850 ****
perror("Cannot open gnuplot output file");
exit(1);
}
! fprintf(out,
"starttime\tmicroseconds\tctime\tdtime\tttime\twait\n");
for (i = 0; i < requests; i++) {
apr_time_t diff = stats[i].time - stats[i].ctime;
--- 844,850 ----
perror("Cannot open gnuplot output file");
exit(1);
}
! fprintf(out, "starttime\tseconds\tctime\tdtime\tttime\twait\n");
for (i = 0; i < requests; i++) {
apr_time_t diff = stats[i].time - stats[i].ctime;
Regards,
Gabriel Kerneis
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]