This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 801fba68b3 Record the instant the request processing starts.
801fba68b3 is described below
commit 801fba68b317a03d49eec45e98b1d37a92e89119
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Sep 22 20:44:44 2025 +0100
Record the instant the request processing starts.
---
java/org/apache/coyote/Request.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/java/org/apache/coyote/Request.java
b/java/org/apache/coyote/Request.java
index 1808262e71..2f31210829 100644
--- a/java/org/apache/coyote/Request.java
+++ b/java/org/apache/coyote/Request.java
@@ -20,6 +20,7 @@ import java.io.IOException;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
+import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -149,6 +150,7 @@ public final class Request {
private long bytesRead = 0;
// Time of the request - useful to avoid repeated calls to
System.currentTime
private long startTime = -1;
+ private Instant startInstant = null;
private long threadId = 0;
private int available = 0;
@@ -703,10 +705,16 @@ public final class Request {
@Deprecated
public void setStartTime(long startTime) {
this.startTime = startTime;
+ startInstant = Instant.now();
}
public void markStartTime() {
startTime = System.currentTimeMillis();
+ startInstant = Instant.now();
+ }
+
+ public Instant getStartInstant() {
+ return startInstant;
}
public long getThreadId() {
@@ -808,6 +816,7 @@ public final class Request {
allDataReadEventSent.set(false);
startTime = -1;
+ startInstant = null;
threadId = 0;
if (hook instanceof NonPipeliningProcessor) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]