https://bz.apache.org/bugzilla/show_bug.cgi?id=64519

            Bug ID: 64519
           Summary: Response Time not matching
           Product: JMeter
           Version: 5.1.1
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: sownarajku...@gmail.com
  Target Milestone: JMETER_5.3.1

1. Below is my sample code, to make a request and capture Start Time and End
Time
                {
                        DateTimeFormatter dtf =
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");  
                        LocalDateTime now = LocalDateTime.now();                
                        System.out.println("Start Time: " + dtf.format(now));
                }
                    HttpResponse httpResponse = httpClient.execute( request );
                {
                        DateTimeFormatter dtf =
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");  
                        LocalDateTime now = LocalDateTime.now();                
                        System.out.println("End Time: " + dtf.format(now));
                }

2. I have a configuration in Apache Tomcat, to log the request and response
time:-
<Valve className="org.apache.catalina.valves.AccessLogValve" 
       directory="logs" 
       pattern="%h %l %u %t &quot;%r&quot; %s %b %{x-Request-ID}i
%{begin:yyyy-MM-dd'T'HH:mm:ss.SSS}t %{end:yyyy-MM-dd'T'HH:mm:ss.SSS}t %D" 
       prefix="localhost_access_log" 
       suffix=".txt"/>

3. Sample output:-
10.2.100.12 - - [12/Jun/2020:16:35:06 +0530] "GET
/TestApp/GetTables?input=testlimit=10 HTTP/1.1" 200 10081 000001
2020-06-12T16:34:13.518 2020-06-12T16:35:06.538 53020

4. I could see the request time and response time of my java code matches with
Tomcat log. What I mean to say is {Request Time in Java}, {Request logged at
Tomcat}, {Response logged at Tomcat}, {Response received time in Java} which
will be in order.

5. But when I try to generate the report in JMeter, Sample Time (or) Latency
most of cases will be lesser than the elapsed time in Tomcat log.

My Query is 
1. Whether the log time in Tomcat is not exact.
2. JMeter Sample Time or Latency defines the first response time.
3. Or is it my java code not handling it properly

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to