tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_status.c
Date Sat, 13 Mar 2004 09:17:25 GMT
mturk       2004/03/13 01:17:25

  Modified:    jk/native2/common jk_worker_status.c
  Log:
  Convert the times to msecs. apr_time_now return microsecods,
  so displaying that is not so user friendly.
  All the display logic and function calls should change to apr_time_t instead
  long.
  
  Revision  Changes    Path
  1.55      +13 -13    jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c
  
  Index: jk_worker_status.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- jk_worker_status.c	12 Mar 2004 19:19:58 -0000	1.54
  +++ jk_worker_status.c	13 Mar 2004 09:17:25 -0000	1.55
  @@ -61,20 +61,20 @@
       apr_ctime( ctimeBuf, stat->connectedTime );
       s->jkprintf(env, s, "<td>%s</td>\n", ctimeBuf );
   
  -    s->jkprintf(env, s, "<td>%ld</td>\n", (long)stat->totalTime );
  -    s->jkprintf(env, s, "<td>%ld</td>\n", (long)stat->maxTime );
  +    s->jkprintf(env, s, "<td>%ld</td>\n", (long)apr_time_as_msec(stat->totalTime));
  +    s->jkprintf(env, s, "<td>%ld</td>\n", (long)apr_time_as_msec(stat->maxTime));
   
       if( stat->reqCnt + stat->errCnt > 0 ) 
           s->jkprintf(env, s, "<td>%ld</td>\n",
  -                    (long)(stat->totalTime / ( stat->reqCnt + stat->errCnt ))
);
  +                    (long)apr_time_as_msec((stat->totalTime / ( stat->reqCnt + stat->errCnt
))));
       else
           s->jkprintf(env, s, "<td>-</td>\n");
   
  -    s->jkprintf(env, s, "<td>%lu</td>\n", (long)stat->startTime );
  +    s->jkprintf(env, s, "<td>%lu</td>\n", (long)apr_time_as_msec(stat->startTime));
       s->jkprintf(env, s, "<td>%ld</td>\n",
  -                (long)(stat->jkStartTime - stat->startTime) );
  +                (long)apr_time_as_msec(stat->jkStartTime - stat->startTime));
       s->jkprintf(env, s, "<td>%ld</td>\n",
  -                (long)(stat->endTime - stat->startTime) );
  +                (long)apr_time_as_msec(stat->endTime - stat->startTime));
   
       totalTime += (long)stat->totalTime;
       if( maxTime < stat->maxTime )
  @@ -100,10 +100,10 @@
       s->jkprintf(env, s, "<tr><td>%d</td>\n", totalReq );
       s->jkprintf(env, s, "<td>%d</td>\n", totalErr );
   
  -    s->jkprintf(env, s, "<td>%ld</td>\n", maxTime );
  +    s->jkprintf(env, s, "<td>%ld</td>\n", apr_time_as_msec(maxTime));
   
       if( totalErr + totalReq > 0 ) {
  -        unsigned long avg=totalTime / ( totalReq + totalErr );
  +        unsigned long avg=apr_time_as_msec(totalTime / ( totalReq + totalErr));
           s->jkprintf(env, s, "<td>%ld</td>\n", avg );
       } else {
           s->jkprintf(env, s, "<td>-</td>\n" );
  @@ -479,14 +479,14 @@
                   apr_ctime( ctimeBuf, stat->connectedTime );
                   s->jkprintf(env, s, "lastConnectionTime=%s\n", ctimeBuf);
   
  -                s->jkprintf(env, s, "totalTime=%ld\n", (long)stat->totalTime );
  -                s->jkprintf(env, s, "maxTime=%ld\n", (long)stat->maxTime ); 
  +                s->jkprintf(env, s, "totalTime=%ld\n", (long)apr_time_as_msec(stat->totalTime));
  +                s->jkprintf(env, s, "maxTime=%ld\n", (long)apr_time_as_msec(stat->maxTime));

   
  -                s->jkprintf(env, s, "requestStart=%lu\n", (long)stat->startTime);

  +                s->jkprintf(env, s, "requestStart=%lu\n", (long)apr_time_as_msec(stat->startTime));

                   s->jkprintf(env, s, "jkTime=%ld\n", 
  -                            (long)(stat->jkStartTime - stat->startTime) );
  +                            (long)apr_time_as_msec((stat->jkStartTime - stat->startTime)));
                   s->jkprintf(env, s, "requestEnd=%ld\n", 
  -                            (long)(stat->endTime - stat->startTime) );
  +                            (long)apr_time_as_msec((stat->endTime - stat->startTime)));
                   s->jkprintf(env, s, "\n"); 
               }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message