You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/05/05 08:31:44 UTC

DO NOT REPLY [Bug 44931] New: Misleading use of "seconds" in Apache Bench ( instead of "microseconds")

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: bugs@httpd.apache.org
        ReportedBy: gabriel+apache@kerneis.info


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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 44931] Misleading use of "seconds" in Apache Bench ( instead of "microseconds")

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44931





--- Comment #2 from Ruediger Pluem <rp...@apache.org>  2008-05-27 15:14:37 PST ---
Backported to 2.2.x as r660576
(http://svn.apache.org/viewvc?rev=660576&view=rev).


-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 44931] Misleading use of "seconds" in Apache Bench ( instead of "microseconds")

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44931


Roy T. Fielding <fi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
          Component|Other Modules               |support
         Resolution|                            |FIXED




--- Comment #1 from Roy T. Fielding <fi...@apache.org>  2008-05-10 17:41:47 PST ---
Fixed in r655214 of trunk.

I was fixing other errors when I found this inconsistency with ab
as distributed with httpd 1.3.x.  I restored the old output and then
found your PR today while looking for related errors.

It might make more sense for ab to consistently output milliseconds
in fractional form (making full use of the microsecond resolution),
but that would be an enhancement.


-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org