Loadrunner中Throughput(吞吐量)的分析与计算

Loadrunner中Throughput(吞吐量)的分析与计算

核心提示:Throughput翻译为吞吐量,按照常规理解网络吞吐量表示在单位时间内通过网卡数据量之和

Throughput翻译为吞吐量,按照常规理解网络吞吐量表示在单位时间内通过网卡数据量之和,其中即包括本机网卡发送出去的数据量也包括本机网卡接收到的数据量,但这个理解在Loadrunner记录的Throughput中是错误的!
  先提出正确的结果,然后用具体的试验加以证明:

  Loadrunner记录的Throughput是接收到服务器返回的所有字节数之和,与本地发出的字节数无关!

  我们用baidu.com做个试验,过程很简单:

  1、使用VUGen录制baidu的首页,仅打开首页即可

  2、在Recording Log中记录客户端和服务器端的数据发送情况,统计发出的字节总数和接收到的字节总数。

  Recording Log内容如下:

  Request Connection: Remote Server @ 220.181.6.19:80 (Service=) (Sid= 1) PROXIED!

  "GET /"

  (Sid: 1) Client -> Server : 407 bytes (Service=HTTP)

  (Sid: 1) Server -> Client : 208 bytes (Service=HTTP)

  (Sid: 1) Server -> Client : 1990 bytes (Service=HTTP)

  "GET /img/baidu_logo.gif"

  (Sid: 1) Client -> Server : 457 bytes (Service=HTTP)

  (Sid: 1) Server -> Client : 1779 bytes (Service=HTTP)

  Address lookup for test75 = 10.10.10.1

  Request Connection: Remote Server @ 220.181.5.21:80 (Service=) (Sid= 2) PROXIED!

  "GET /img/gs.gif"

  (Sid: 2) Client -> Server : 450 bytes (Service=HTTP)

  "GET /js/bdsug.js?v=1.0.1.0"

  (Sid: 1) Client -> Server : 460 bytes (Service=HTTP)

  (Sid: 1) Server -> Client : 2581 bytes (Service=HTTP)

  (Sid: 2) Server -> Client : 369 bytes (Service=HTTP)

  (Sid: 2) Connection Terminated (by Server)

  其中发出总数为:1774

  接收字节总数为:6927

  那么loadrunner运行后,Throughput记录的是发出的字节数呢还是接收的字节数呢,或者还是两者之和呢?我们接下来继续做!

  3、在run time setting中设置该脚本运行10次

  也就是说发送总字节数为17740,接收总字节数为69270

  4、在Controller中运行该脚本,场景运行模式设置为:Classic schedule

  start vusers设置为:simultaneously

  duration设置为:run until completion

  5、我们预计一下运行该场景的结果,其中吞吐量的数值应该是69270就证明了我们说法

  6、运行场景

  7、场景运行完成后,点击analysis results生成分析结果报表

  Analysis Summary Period: 16/02/2009 15:51:55 - 16/02/2009 15:52:08

  Scenario Name: Scenario1

  Results in Session: C:Documents and Settings estMy Documentslr_http es es.lrr

  Duration: 13 seconds.

  Statistics Summary

  Maximum Running Vusers: 1

  Total Throughput (bytes): 69,270 (

与接受到的总字节数一样)

  Average Throughput (bytes/second): 4,948

  Total Hits: 40

  Average Hits per Second: 2.857 View HTTP Responses Summary

  总结:loadrunner中Total Throughput (bytes)所统计数量是,在整个测试过程中,从服务器返回给客户端的所有字节数,与发送请求的字节数无关!

版权声明:本文为博主原创文章,未经博主允许不得转载。

原文地址:https://www.cnblogs.com/zhengah/p/4616654.html