JMeter监控器组件之 Spline Visualizer(一)

我把“Spline Visualizer”组件翻译为“样条曲线图”。

官方文档对其描述为“The Spline Visualizer provides a view of all sample times from the start of the test till the end, regardless of how many samples have been taken. The spline has 10 points, each representing 10% of the samples, and connected using spline logic to show a single continuous line.”(参见jakarta-jmeter-2.3.2/printable_docs/usermanual /component_reference.html#Spline_Visualizer)。

初次读官方描述时,不是很理解。但看到http://www.jajakarta.org/jmeter/1.7/en/user_manual /visualizers.html中关于Spline Visualizer的描述时,才豁然开朗。摘录如下“The spline visualizer presents a smooth curve that represents the data from the entire test run. There are 10 points on the curve, each point represents an average of some subset of the sample run. For instance, if your test run has been running for some time, and you have 1000 samples, the first "point" on the curve will represent an average of the first 100 samples, the next will be for the second 100 samples, etc. These points are connected using spline curves, and allow users to see the entire history of the test and how the responsiveness of their application has changed over time.”。

用自己理解的语言描述为:运行完你的测试计划后,将得到多个“请求样本”(Sampler)及其响应时间的数据,假设得到了1000组数据。将这些数据分为10组:第1至第100条数据为第1组,第101至第200条数据为第2组,...,第901至第1000条数据为第10组。计算每组数据的平均值后可以得到10个平均值。以这10个平均值做纵坐标,以1,2,...,10的均匀刻度做横坐标,绘制平滑曲线,就是你看到的JMeter样条曲线图。

亲自运行JMeter(2.3.2),主要配置信息如下:

  • 测试URL:http://jakarta.apache.org/jmeter/usermanual/index.html
  • 线程数:10
  • Ramp-Up Period (in second):1
  • 循环次数:10

将数据保存到本机(.jtl),再使用Excel绘制平滑曲线。将JMeter生成的样条曲线图与之比较,可以看出,图形基本吻合。

JMeter生成的样条曲线

将JMeter生成的数据加工后,使用Excel绘制的平滑曲线

猜你喜欢

转载自blog.csdn.net/jinjiankang/article/details/3929413