This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new faa7f3da48 Record the instance the request processing starts.
faa7f3da48 is described below

commit faa7f3da484b4f921ddf1fac5fae5eb957ad789c
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Sep 22 20:44:44 2025 +0100

    Record the instance the request processing starts.
---
 java/org/apache/coyote/Request.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/java/org/apache/coyote/Request.java 
b/java/org/apache/coyote/Request.java
index 854030e775..00d8592ebb 100644
--- a/java/org/apache/coyote/Request.java
+++ b/java/org/apache/coyote/Request.java
@@ -18,6 +18,7 @@ package org.apache.coyote;
 
 import java.io.IOException;
 import java.io.StringReader;
+import java.time.Instant;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Objects;
@@ -161,6 +162,7 @@ public final class Request {
     private long bytesRead = 0;
     // Time of the request - useful to avoid repeated calls to 
System.currentTime
     private long startTimeNanos = -1;
+    private Instant startInstant = null;
     private long threadId = 0;
     private int available = 0;
 
@@ -702,6 +704,11 @@ public final class Request {
 
     public void markStartTime() {
         startTimeNanos = System.nanoTime();
+        startInstant = Instant.now();
+    }
+
+    public Instant getStartInstant() {
+        return startInstant;
     }
 
     public long getThreadId() {
@@ -812,6 +819,7 @@ public final class Request {
         allDataReadEventSent.set(false);
 
         startTimeNanos = -1;
+        startInstant = null;
         threadId = 0;
 
         if (hook instanceof NonPipeliningProcessor) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to