问题描述
我正在使用J-meter通过HTTP请求获取API的响应时间,但是该API在内部几乎没有其他api服务.现在,我也需要这些内部调用占用的响应时间.请任何人协助通过J-meter对此分类
I'm using J-meter to get response time for an API via HTTP request but this API internally few more api services. Now, i need the response time taken by these internal calls too.Pls could anyone assist to get this one sorted via J-meter
推荐答案
以下是我能想到的:-
选中跟随重定向",然后使用查看结果树"或简单数据编写器"之类的侦听器以XML格式而不是CSV格式编写输出.您可以在此处找到重定向的URL和响应时间.但是,XML创建将消耗大量资源,应该避免.
Check on "Follow Redirect" and then use listener like "View Result tree" or "Simple Data Writer" to write the output in an XML format instead of CSV. There you can find the redirected URLs and response time.But, XML creation will consumer a lot of resource and should be avoided.
第二,使用后处理器,从采样器结果中获取响应时间以及重定向的URL,并将其写入csv.这需要一些编码.
Second, use post processor and fetch the response time from the sampler results along with redirected URL and write it in a csv. This requires some coding.
这篇关于如何使用Jmeter获取API内调用的响应时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!