httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r149550 - in httpd/httpd/trunk: CHANGES include/scoreboard.h modules/http/http_request.c server/scoreboard.c
Date Wed, 02 Feb 2005 19:32:21 GMT
Author: jim
Date: Wed Feb  2 11:32:18 2005
New Revision: 149550

URL: http://svn.apache.org/viewcvs?view=rev&rev=149550
Log:
Keep track of time taken to process requests again.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/include/scoreboard.h
    httpd/httpd/trunk/modules/http/http_request.c
    httpd/httpd/trunk/server/scoreboard.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/CHANGES?view=diff&r1=149549&r2=149550
==============================================================================
--- httpd/httpd/trunk/CHANGES (original)
+++ httpd/httpd/trunk/CHANGES Wed Feb  2 11:32:18 2005
@@ -2,6 +2,9 @@
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) Start keeping track of time-taken-to-process-request again for
+     mod_status if ExtendedStatus is enabled. [Jim Jagielski]
+
   *) mod_cache: Add CacheStorePrivate and CacheStoreNoStore directive.
      [Justin Erenkrantz]
 

Modified: httpd/httpd/trunk/include/scoreboard.h
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/include/scoreboard.h?view=diff&r1=149549&r2=149550
==============================================================================
--- httpd/httpd/trunk/include/scoreboard.h (original)
+++ httpd/httpd/trunk/include/scoreboard.h Wed Feb  2 11:32:18 2005
@@ -174,7 +174,7 @@
 AP_DECLARE(int) ap_update_child_status(ap_sb_handle_t *sbh, int status, request_rec *r);
 AP_DECLARE(int) ap_update_child_status_from_indexes(int child_num, int thread_num,
                                                     int status, request_rec *r);
-void ap_time_process_request(int child_num, int thread_num, int status);
+void ap_time_process_request(ap_sb_handle_t *sbh, int status);
 
 AP_DECLARE(worker_score *) ap_get_scoreboard_worker(int x, int y);
 AP_DECLARE(process_score *) ap_get_scoreboard_process(int x);

Modified: httpd/httpd/trunk/modules/http/http_request.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/http/http_request.c?view=diff&r1=149549&r2=149550
==============================================================================
--- httpd/httpd/trunk/modules/http/http_request.c (original)
+++ httpd/httpd/trunk/modules/http/http_request.c Wed Feb  2 11:32:18 2005
@@ -248,6 +248,8 @@
      * Use this hook with extreme care and only if you know what you are 
      * doing.
      */
+    if (ap_extended_status)
+        ap_time_process_request(r->connection->sbh, START_PREQUEST);
     access_status = ap_run_quick_handler(r, 0);  /* Not a look-up request */
     if (access_status == DECLINED) {
         access_status = ap_process_request_internal(r);
@@ -278,6 +280,8 @@
     check_pipeline_flush(r);
     ap_update_child_status(r->connection->sbh, SERVER_BUSY_LOG, r);
     ap_run_log_transaction(r);
+    if (ap_extended_status)
+        ap_time_process_request(r->connection->sbh, STOP_PREQUEST);
 }
 
 static apr_table_t *rename_original_env(apr_pool_t *p, apr_table_t *t)

Modified: httpd/httpd/trunk/server/scoreboard.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/scoreboard.c?view=diff&r1=149549&r2=149550
==============================================================================
--- httpd/httpd/trunk/server/scoreboard.c (original)
+++ httpd/httpd/trunk/server/scoreboard.c Wed Feb  2 11:32:18 2005
@@ -448,15 +448,15 @@
                                                status, r);
 }
 
-void ap_time_process_request(int child_num, int thread_num, int status)
+void ap_time_process_request(ap_sb_handle_t *sbh, int status)
 {
     worker_score *ws;
 
-    if (child_num < 0) {
+    if (sbh->child_num < 0) {
         return;
     }
 
-    ws = &ap_scoreboard_image->servers[child_num][thread_num];
+    ws = &ap_scoreboard_image->servers[sbh->child_num][sbh->thread_num];
 
     if (status == START_PREQUEST) {
         ws->start_time = apr_time_now(); 



Mime
View raw message