哪个时间是日志时间 [英] Which time is log timeStamp

查看:102
本文介绍了哪个时间是日志时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从负载测试获得以下测试结果-

I have following test result from load test -

timeStamp,elapsed,label,responseCode,Latency
1447675626444,9,API1,201,9
1447675626454,1151,API2,404,Not Found,1151

明确地说,对API2的调用失败,并且两次调用之间存在1oms的延迟. 我知道标签timeStamp是从纪元开始的时间,但是它是从客户端触发请求的时间还是接收到最后一个响应字节的时间? 如果是后者,那么我如何找到从客户端发出请求的时间?

As explicit, call to API2 fails and there is delay of 1oms between two calls. I know that label timeStamp is time from epoch but is it the time when request was fired from client or the time when last response byte was received? If latter then how do I find the time when request was fired from client?

推荐答案

第一个timestamp是请求开始时间. latency是从接收到第一个响应字节起的时间戳开始的时间. elapsed是从收到完整响应的时间戳记开始的时间.因此,就您而言,

The first timestamp is request start time. The latency is time from timestamp when the first response byte is received. elapsed is time from timestamp when the complete response was received. So in your case,

444:API1请求失败. 9毫秒后,在
453:收到API1响应的第一个字节和最后一个字节-因为等待时间与经过的时间相同 454:API2请求已退出

444: API1 request went out. 9 milliseconds later, at
453: First byte AND last byte of API1 response is received - because latency is the same as elapsed 454: API2 request went out

如果您在JMeter中使用具有两个采样器的常规线程组,则在完全接收到对第一个采样器的响应之前,不会发送第二个请求.您的问题似乎不是纯粹的通话顺序.

If you're using a regular thread group in JMeter with two samplers, the second request is not sent out until the response to the first sampler is completely received. Your issue would seem to be something other than pure sequence of calls.

==

要弄清楚@Mike所说的请求是在两三行代码后发送的".

To clarify what @Mike said about "request is sent behind two or three lines code.":

时间戳记是JMeter采样器代码标记请求开始事件并进行日志输入的时间.之后,JVM必须执行几行代码,以使用Apache HTTPClient对象创建TCP连接,组合一个HTTP请求,然后通过可能的几个TCP数据包发出一个HTTP数据包.在任何现代系统上,时间戳和实际请求发出之间的差异将小于几毫秒.如果这个时间对您来说很重要,那么JMeter并不是真正合适的工具,您应该使用Wireshark之​​类的网络嗅探器来查找第一个数据包实际发送时间的时间戳.

The Timestamp is when JMeter sampler code marked the request start event and made a log entry. After which the JVM has to execute a few of lines of code to use Apache HTTPClient object to create a TCP connection, assemble a HTTP request and then send out a HTTP packet over possibly several TCP packets. On any modern system this difference between timestamp and actual request going out will be less than a few millseconds. If this timing is important for you to measure, JMeter isn't really the right tool, you should use a network sniffer like Wireshark to look for timestamp of when the first packet was actually transmitted.

这篇关于哪个时间是日志时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆