You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2025/06/03 08:02:36 UTC

svn commit: r1926080 - in /httpd/httpd/branches/2.4.x: ./ changes-entries/pr69579.txt include/ap_mmn.h include/scoreboard.h modules/http2/h2_mplx.c server/scoreboard.c

Author: icing
Date: Tue Jun  3 08:02:35 2025
New Revision: 1926080

URL: http://svn.apache.org/viewvc?rev=1926080&view=rev
Log:
Merge  /httpd/httpd/trunk:r1923754

  *) scoreboard/mod_http2: record durations of HTTP/2 requests.
     PR 69579 [Pierre Brochard <pi...@m4x.org>]


Added:
    httpd/httpd/branches/2.4.x/changes-entries/pr69579.txt
      - copied unchanged from r1923754, httpd/httpd/trunk/changes-entries/pr69579.txt
Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/include/ap_mmn.h
    httpd/httpd/branches/2.4.x/include/scoreboard.h
    httpd/httpd/branches/2.4.x/modules/http2/h2_mplx.c
    httpd/httpd/branches/2.4.x/server/scoreboard.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1923754

Modified: httpd/httpd/branches/2.4.x/include/ap_mmn.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/include/ap_mmn.h?rev=1926080&r1=1926079&r2=1926080&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/include/ap_mmn.h (original)
+++ httpd/httpd/branches/2.4.x/include/ap_mmn.h Tue Jun  3 08:02:35 2025
@@ -609,6 +609,7 @@
  * 20120211.137 (2.4.63-dev) Add AP_MPMQ_CAN_WAITIO
  * 20120211.138 (2.4.63-dev) Add is_host_matchable to proxy_worker_shared
  * 20120211.139 (2.4.63-dev) Add dav_get_base_path() to mod_dav
+ * 20211221.140 (2.4.64-dev) Add ap_set_time_process_request() to scoreboard.h
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
@@ -616,7 +617,7 @@
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
 #define MODULE_MAGIC_NUMBER_MAJOR 20120211
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 139                 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 140                 /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a

Modified: httpd/httpd/branches/2.4.x/include/scoreboard.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/include/scoreboard.h?rev=1926080&r1=1926079&r2=1926080&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/include/scoreboard.h (original)
+++ httpd/httpd/branches/2.4.x/include/scoreboard.h Tue Jun  3 08:02:35 2025
@@ -198,7 +198,9 @@ AP_DECLARE(int) ap_update_child_status_f
 AP_DECLARE(int) ap_update_child_status_descr(ap_sb_handle_t *sbh, int status, const char *descr);
 
 AP_DECLARE(void) ap_time_process_request(ap_sb_handle_t *sbh, int status);
-
+AP_DECLARE(void) ap_set_time_process_request(ap_sb_handle_t* const sbh,
+		const apr_time_t timebeg,const apr_time_t timeend);
+    
 AP_DECLARE(int) ap_update_global_status(void);
 
 AP_DECLARE(worker_score *) ap_get_scoreboard_worker(ap_sb_handle_t *sbh);

Modified: httpd/httpd/branches/2.4.x/modules/http2/h2_mplx.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http2/h2_mplx.c?rev=1926080&r1=1926079&r2=1926080&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http2/h2_mplx.c (original)
+++ httpd/httpd/branches/2.4.x/modules/http2/h2_mplx.c Tue Jun  3 08:02:35 2025
@@ -29,6 +29,7 @@
 #include <http_connection.h>
 #include <http_log.h>
 #include <http_protocol.h>
+#include <scoreboard.h>
 
 #include <mpm_common.h>
 
@@ -974,7 +975,9 @@ static void s_c2_done(h2_mplx *m, conn_r
     /* From here on, the final handling of c2 is done by c1 processing.
      * Which means we can give it c1's scoreboard handle for updates. */
     c2->sbh = m->c1->sbh;
-
+#if AP_MODULE_MAGIC_AT_LEAST(20211221, 29)
+    ap_set_time_process_request(c2->sbh,conn_ctx->started_at,conn_ctx->done_at);
+#endif
     ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, c2,
                   "h2_mplx(%s-%d): request done, %f ms elapsed",
                   conn_ctx->id, conn_ctx->stream_id,

Modified: httpd/httpd/branches/2.4.x/server/scoreboard.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/scoreboard.c?rev=1926080&r1=1926079&r2=1926080&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/scoreboard.c (original)
+++ httpd/httpd/branches/2.4.x/server/scoreboard.c Tue Jun  3 08:02:35 2025
@@ -653,6 +653,22 @@ AP_DECLARE(void) ap_time_process_request
     }
 }
 
+AP_DECLARE(void) ap_set_time_process_request(ap_sb_handle_t* const sbh,
+		const apr_time_t timebeg,const apr_time_t timeend)
+{
+    if (!sbh || sbh->child_num < 0)
+        return;
+
+    worker_score* const ws =
+	&ap_scoreboard_image->servers[sbh->child_num][sbh->thread_num];
+    
+    ws->start_time = timebeg;
+    ws->stop_time = ws->last_used = timeend;
+    
+    if (ap_extended_status)
+	ws->duration += timeend - timebeg;
+}
+
 AP_DECLARE(int) ap_update_global_status(void)
 {
 #ifdef HAVE_TIMES



Re: svn commit: r1926080 - in /httpd/httpd/branches/2.4.x: ./ changes-entries/pr69579.txt include/ap_mmn.h include/scoreboard.h modules/http2/h2_mplx.c server/scoreboard.c

Posted by Ruediger Pluem <rp...@apache.org>.

On 6/3/25 10:02 AM, icing@apache.org wrote:
> Author: icing
> Date: Tue Jun  3 08:02:35 2025
> New Revision: 1926080
> 
> URL: http://svn.apache.org/viewvc?rev=1926080&view=rev
> Log:
> Merge  /httpd/httpd/trunk:r1923754
> 
>   *) scoreboard/mod_http2: record durations of HTTP/2 requests.
>      PR 69579 [Pierre Brochard <pi...@m4x.org>]
> 
> 
> Added:
>     httpd/httpd/branches/2.4.x/changes-entries/pr69579.txt
>       - copied unchanged from r1923754, httpd/httpd/trunk/changes-entries/pr69579.txt
> Modified:
>     httpd/httpd/branches/2.4.x/   (props changed)
>     httpd/httpd/branches/2.4.x/include/ap_mmn.h
>     httpd/httpd/branches/2.4.x/include/scoreboard.h
>     httpd/httpd/branches/2.4.x/modules/http2/h2_mplx.c
>     httpd/httpd/branches/2.4.x/server/scoreboard.c
> 

> Modified: httpd/httpd/branches/2.4.x/server/scoreboard.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/scoreboard.c?rev=1926080&r1=1926079&r2=1926080&view=diff
> ==============================================================================
> --- httpd/httpd/branches/2.4.x/server/scoreboard.c (original)
> +++ httpd/httpd/branches/2.4.x/server/scoreboard.c Tue Jun  3 08:02:35 2025
> @@ -653,6 +653,22 @@ AP_DECLARE(void) ap_time_process_request
>      }
>  }
>  
> +AP_DECLARE(void) ap_set_time_process_request(ap_sb_handle_t* const sbh,
> +		const apr_time_t timebeg,const apr_time_t timeend)
> +{
> +    if (!sbh || sbh->child_num < 0)
> +        return;
> +
> +    worker_score* const ws =
> +	&ap_scoreboard_image->servers[sbh->child_num][sbh->thread_num];

Unfortunately r1923806 is missing (I missed this) and hence the gcc 12 maintainer-mode job fails :-(:

/home/runner/work/httpd/httpd/server/scoreboard.c:662:5: error: ISO C90 forbids mixed declarations and code
[-Werror=declaration-after-statement]
  662 |     worker_score* const ws =
      |     ^~~~~~~~~~~~
cc1: all warnings being treated as errors

I just proposed r1923806 for backport in r1926094.


> +    
> +    ws->start_time = timebeg;
> +    ws->stop_time = ws->last_used = timeend;
> +    
> +    if (ap_extended_status)
> +	ws->duration += timeend - timebeg;
> +}
> +
>  AP_DECLARE(int) ap_update_global_status(void)
>  {
>  #ifdef HAVE_TIMES
> 
> 
> 

Regards

RĂ¼diger