加特林(Gatling):在几秒钟内了解rampUsersPerSec(minTPS)到maxTPS [英] Gatling: Understanding rampUsersPerSec(minTPS) to maxTPS during seconds

查看:130
本文介绍了加特林(Gatling):在几秒钟内了解rampUsersPerSec(minTPS)到maxTPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在检查一个scala代码,以确认他们在20秒钟内注入交易的地方.

 /* TPS =每秒事务数*/val minTps = Integer.parseInt(System.getProperty("minTps","1"))val maxTps = Integer.parseInt(System.getProperty("maxTps","5"))var rampUsersDurationInMinutes = Integer.parseInt(System.getProperty("rampUsersDurationInMinutes","20"))setUp(scn.inject(在(rampUsersDurationInMinutes秒)内将rampUsersPerSec(minTps)转换为maxTps.protocols(tcilProtocol)) 


有人问了同样的问题

  • 阻止(斜坡)1 = 4个用户+1
  • 阻止(斜坡)2 = 12个用户+2
  • 阻止(升级)3 = 24个用户+3
  • 阻止(升级)4 = 40个用户+4
  • 阻止(升级)5 = 60个用户+5

结果表明请求数确实为60.我的计算正确吗?

  ----全球信息-------------------------------------------------------->请求计数60(OK = 38 KO = 22)>最短响应时间2569(OK = 2569 KO = 60080)>最大响应时间61980(OK = 61980 KO = 61770)>平均响应时间42888(OK = 32411 KO = 60985)>标准偏差20365(OK = 18850 KO = 505)>响应时间50%百分位数51666(OK = 32143 KO = 61026)>响应时间75th百分位数60903(OK = 48508 KO = 61371)>响应时间95%百分数61775(OK = 61886 KO = 61725)>响应时间99th百分位数61974(OK = 61976 KO = 61762)>平均请求数/秒0.741(OK = 0.469 KO = 0.272)----响应时间分配------------------------------------------------ 

解决方案

rampUsersPerSec是开放式工作负载模型注入,您可以在其中指定用户启动方案的速率.加特林文档表示该注入配置文件

在给定的持续时间内,将用户从起始速率注入到目标速率(以每秒用户数为单位).将定期注入用户

因此,尽管我不确定您所提供的示例是否正确,因为加特林机使用的是常规间隔"(可能是更平滑的模型),所以您或多或少是正确的.您指定一个起始速率和一个最终速率,加特林系统计算出您持续时间内的所有中间注入速率.

请注意,这与模拟将生成的并发用户数无关,这取决于到达率(由您控制​​)和执行时间(不受控制)

I am checking a scala code for gatling where they inject transactions for the period of 20 seconds.

/*TPS = Transaction Per Second */   
  val minTps = Integer.parseInt(System.getProperty("minTps", "1"))
  val maxTps = Integer.parseInt(System.getProperty("maxTps", "5"))

  var rampUsersDurationInMinutes =Integer.parseInt(System.getProperty("rampUsersDurationInMinutes", "20"))
  setUp(scn.inject(
    rampUsersPerSec(minTps) to maxTps during (rampUsersDurationInMinutes seconds)).protocols(tcilProtocol))


The same question was asked What does rampUsersPerSec function really do? but never answered. I think that ideally the the graph should be looking like that.

could you please confirm if I correctly understood rampUsersPerSec?

  • block (ramp) 1 = 4 users +1
  • block (ramp) 2 = 12 users +2
  • block (ramp) 3 = 24 users +3
  • block (ramp) 4 = 40 users +4
  • block (ramp) 5 = 60 users +5

The results show that the requests count is indeed 60. Is my calculation correct?

---- Global Information --------------------------------------------------------
> request count                                         60 (OK=38     KO=22    )
> min response time                                   2569 (OK=2569   KO=60080 )
> max response time                                  61980 (OK=61980  KO=61770 )
> mean response time                                 42888 (OK=32411  KO=60985 )
> std deviation                                      20365 (OK=18850  KO=505   )
> response time 50th percentile                      51666 (OK=32143  KO=61026 )
> response time 75th percentile                      60903 (OK=48508  KO=61371 )
> response time 95th percentile                      61775 (OK=61886  KO=61725 )
> response time 99th percentile                      61974 (OK=61976  KO=61762 )
> mean requests/sec                                  0.741 (OK=0.469  KO=0.272 )
---- Response Time Distribution ------------------------------------------------

解决方案

rampUsersPerSec is an open workload model injection where you specify the rate at which users start the scenario. The gatling documentation says that this injection profile

Injects users from starting rate to target rate, defined in users per second, during a given duration. Users will be injected at regular intervals

So while I'm not sure that the example you provide is precisely correct in that gatling is using a second as the 'regular interval' (it might be a smoother model), you are more or less correct. You specify a starting rate and a final rate, and gatling works out all the intermediate injection rates for your duration.

Note that this says nothing about the number of concurrent users your simulation will generate - that is a function of the arrival rate (which you control) and the execution time (which you do not)

这篇关于加特林(Gatling):在几秒钟内了解rampUsersPerSec(minTPS)到maxTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆