MCPcopy Create free account
hub / github.com/apache/tomcat / updateCounters

Method updateCounters

java/org/apache/coyote/RequestInfo.java:236–251  ·  view source on GitHub ↗

Called by the processor before recycling the request. It'll collect statistic information.

()

Source from the content-addressed store, hash-verified

234 * Called by the processor before recycling the request. It'll collect statistic information.
235 */
236 void updateCounters() {
237 bytesReceived += req.getBytesRead();
238 bytesSent += req.getResponse().getContentWritten();
239
240 requestCount++;
241 if (req.getResponse().getStatus() >= 400) {
242 errorCount++;
243 }
244 long time = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - req.getStartTimeNanos());
245 this.lastRequestProcessingTime = time;
246 processingTime += time;
247 if (maxTime < time) {
248 maxTime = time;
249 maxRequestUri = req.requestURI().toString();
250 }
251 }
252
253 /**
254 * Return the current processing stage.

Callers

nothing calls this directly

Calls 7

getStartTimeNanosMethod · 0.80
requestURIMethod · 0.80
getResponseMethod · 0.65
getStatusMethod · 0.65
toStringMethod · 0.65
getBytesReadMethod · 0.45
getContentWrittenMethod · 0.45

Tested by

no test coverage detected