]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Start keeping track of the amount of time taken to process a request again.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 3 Feb 2005 23:47:36 +0000 (23:47 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 3 Feb 2005 23:47:36 +0000 (23:47 +0000)
Results in the 'Req' field in mod_status no longer being bogus.

MFC: 149550
Reviewed by: jim, stas, geoff

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@151258 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
include/scoreboard.h
modules/http/http_request.c
server/scoreboard.c

diff --git a/CHANGES b/CHANGES
index 3243249b95504844628b3beeb071faa44500c32a..fa8b1be7e7705e2fa0c8d48b605dbd3207d3af08 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.53
 
+) *) Start keeping track of time-taken-to-process-request again for
+     mod_status if ExtendedStatus is enabled. [Jim Jagielski]
+
   *) mod_proxy: Handle client-aborted connections correctly.  PR 32443.
      [Janne Hietamäki, Joe Orton]
 
index beb75e513a28b69c98a3ca8cf6b61a874c506f5c..abd5171303e04f580e7dbfe8303e4b42ec9ca53f 100644 (file)
@@ -163,7 +163,7 @@ AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid);
 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);
index f9f82566363a34707f67eb11152a7f914bdee712..3b989cccfd5fb82628b521b40a8968c0d93648f1 100644 (file)
@@ -239,6 +239,8 @@ void ap_process_request(request_rec *r)
      * 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);
@@ -269,6 +271,8 @@ void ap_process_request(request_rec *r)
     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)
index da1bf95fd6cadb2a2b7cb36473247e50b612150a..421b99eb68d3ee85b54713f93e68e5f923cca699 100644 (file)
@@ -423,15 +423,15 @@ AP_DECLARE(int) ap_update_child_status(ap_sb_handle_t *sbh, int status,
                                                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();