You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

JMeter命令行负载测试中如何以微秒为单位测量延迟?

如何将JMeter延迟测量单位改为微秒?

可以将JMeter的延迟测量单位改为微秒,通过修改jmeter.properties配置文件即可实现,具体操作如下:

  • 打开你的jmeter.properties文件(路径为/tmp/jmeter/jmeter.properties),找到sampleresult.timestamp.units配置项
  • 将该配置的值从默认的ms(毫秒)修改为us(微秒),如果配置前有注释符号#,记得去掉
  • 修改完成后保存配置,重新执行负载测试命令即可

修改后,结果文件(如result-http-50.csv)中的timeStamp、elapsed、Latency、Connect等时间相关字段都会以微秒为单位记录,数值会变为原来的1000倍(例如原79毫秒会显示为79000微秒)。


原负载测试命令

jmeter -n -t /tmp/jmeter/https_test.jmx -f -S /tmp/jmeter/jmeter.properties -j /tmp/jmeter/jmeter-http-50.log -l /tmp/jmeter/result-http-50.csv -JProtocol=http -JPort=80 -Jip_address=10.2.1.4 -Jthread_num=50 -Jloop_count=20000

原毫秒单位结果示例

timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1714506750052,79,HTTPs Request,200,OK,Thread Group 1-1,text,true,,859,111,3,3,https://10.2.1.4/,79,0,74
1714506750135,2,HTTPs Request,200,OK,Thread Group 1-1,text,true,,859,111,3,3,https://10.2.1.4/,2,0,0

内容的提问来源于stack exchange,提问作者Hao Xiong

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 17:28:20