1 Summariser日志
JMeter性能测试时,运行很长时间,会产生大量日志,分析起来会比较困难;
如何解决?
JMeter提供了summariser result report,就是在每隔一段时间打一行统计日志,这样日志会大大减少。
1.1 配置
JMeter summariser report的设置在:$JMete_Home/bin/jmeter.properties
#---------------------------------------------------------------------------
# Summariser - Generate Summary Results - configuration (mainly applies to non-GUI mode)
#---------------------------------------------------------------------------
#
# Define the following property to automatically start a summariser with that name
# (applies to non-GUI mode only)
summariser.name=summary
#
# interval between summaries (in seconds) default 3 minutes
summariser.interval=180
#
# Write messages to log file
summariser.log=true
#
# Write messages to System.out
#summariser.out=true
以上设置完成后,jmeter.log中才会有summariser result report( Applies to CLI mode only,仅在命令行模式生效),每隔3分钟向jmeter.log中写入一行log;
1.2 说明
位置:$JMete_Home/bin/jmeter.log
jmeter.log
中,summariser日志格式如下:
2021-01-26 17:21:00,003 INFO o.a.j.r.Summariser: summary + 11464 in 00:01:49 = 105.0/s Avg: 94 Min: 25 Max: 711 Err: 0 (0.00%) Active: 10 Started: 10 Finished: 0
2021-01-26 17:24:00,002 INFO o.a.j.r.Summariser: summary + 19348 in 00:03:00 = 107.5/s Avg: 92 Min: 24 Max: 4515 Err: 0 (0.00%) Active: 10 Started: 10 Finished: 0
2021-01-26 17:24:00,003 INFO o.a.j.r.Summariser: summary = 30812 in 00:04:49 = 106.6/s Avg: 93 Min: 24 Max: 4515 Err: 0 (0.00%)
2021-01-26 17:27:00,010 INFO o.a.j.r.Summariser: summary + 20924 in 00:03:00 = 116.2/s Avg: 85 Min: 25 Max: 823 Err: 0 (0.00%) Active: 10 Started: 10 Finished: 0
2021-01-26 17:27:00,011 INFO o.a.j.r.Summariser: summary = 51736 in 00:07:49 = 110.3/s Avg: 90 Min: 24 Max: 4515 Err: 0 (0.00%)
2021-01-26 17:30:00,006 INFO o.a.j.r.Summariser: summary + 21737 in 00:03:00 = 120.8/s Avg: 82 Min: 24 Max: 789 Err: 0 (0.00%) Active: 10 Started: 10 Finished: 0
2021-01-26 17:30:00,007 INFO o.a.j.r.Summariser: summary = 73473 in 00:10:49 = 113.2/s Avg: 87 Min: 24 Max: 4515 Err: 0 (0.00%)
2021-01-26 17:33:00,010 INFO o.a.j