Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rest 转管试验中的高响应时间_Rest_Performance Testing_Gatling_Apachebench_Scala Gatling - Fatal编程技术网

Rest 转管试验中的高响应时间

Rest 转管试验中的高响应时间,rest,performance-testing,gatling,apachebench,scala-gatling,Rest,Performance Testing,Gatling,Apachebench,Scala Gatling,我对Gatling和API响应时间有问题。我想用一定数量的用户(示例中为200)测试和端点的性能(响应时间) 我在中有一个端点,用于获取使用凭据执行POST操作的有效令牌 结果 Apache基准测试 运行下一个命令: ab-T'application/json'-n200-c200-p credshttps://my-remote-machine/rest/v1/auth-token 我得到下一个响应时间: Connection Times (ms) min mea

我对Gatling和API响应时间有问题。我想用一定数量的用户(示例中为200)测试和端点的性能(响应时间)

我在中有一个端点,用于获取使用凭据执行POST操作的有效令牌

结果 Apache基准测试

运行下一个命令:

ab-T'application/json'-n200-c200-p credshttps://my-remote-machine/rest/v1/auth-token

我得到下一个响应时间:

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      101  112  75.4    104    1139
Processing:    66   85  79.6     73    1036
Waiting:       66   85  79.6     73    1035
Total:        169  197 111.8    177    1209


Percentage of the requests served within a certain time (ms)
  50%    177
  66%    180
  75%    185
  80%    188
  90%    196
  95%    236
  98%    418
  99%   1155
 100%   1209 (longest request)


介于169ms1209ms

但是当我用加特林做这件事时,反应时间非常快,我不知道为什么会发生这种情况。(测试在本地和Jenkins管道中在同一台vShpere主机上执行,网络延迟更少,结果相同)

加特林码 结果是:

================================================================================
---- Global Information --------------------------------------------------------
> request count                                        200 (OK=200    KO=0     )
> min response time                                    365 (OK=365    KO=-     )
> max response time                                   3322 (OK=3322   KO=-     )
> mean response time                                  2359 (OK=2359   KO=-     )
> std deviation                                        750 (OK=750    KO=-     )
> response time 50th percentile                       2544 (OK=2544   KO=-     )
> response time 75th percentile                       2946 (OK=2946   KO=-     )
> response time 95th percentile                       3260 (OK=3260   KO=-     )
> response time 99th percentile                       3306 (OK=3306   KO=-     )
> mean requests/sec                                     50 (OK=50     KO=-     )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                            12 (  6%)
> 800 ms < t < 1200 ms                                  10 (  5%)
> t > 1200 ms                                          178 ( 89%)
> failed                                                 0 (  0%)
================================================================================
================================================================================
----全球信息--------------------------------------------------------
>请求计数200(正常=200 KO=0)
>最小响应时间365(OK=365 KO=-)
>最大响应时间3322(OK=3322 KO=-)
>平均响应时间2359(OK=2359 KO=-)
>标准偏差750(OK=750 KO=-)
>响应时间第50百分位2544(OK=2544 KO=-)
>响应时间第75百分位2946(OK=2946 KO=-)
>响应时间第95百分位3260(OK=3260 KO=-)
>响应时间第99百分位3306(OK=3306 KO=-)
>平均请求数/秒50(OK=50 KO=-)
----响应时间分布------------------------------------------------
>t<800毫秒12(6%)
>800毫秒t>1200毫秒178(89%)
>失败0(0%)
================================================================================
介于365ms3322ms之间,这比使用Apache基准测试要高得多

我重复了很多次测试,结果总是一样的


有什么线索吗?

你没有找到不同的端点吗?(vs)这是一个没有把真正的端点编辑好的问题。无论如何,我认为您的评估是不正确的,因为端点是
post()
中的端点,而不是
http()
中的端点。您可以在Gatling文档()中查看它。谢谢你的支票:)
================================================================================
---- Global Information --------------------------------------------------------
> request count                                        200 (OK=200    KO=0     )
> min response time                                    365 (OK=365    KO=-     )
> max response time                                   3322 (OK=3322   KO=-     )
> mean response time                                  2359 (OK=2359   KO=-     )
> std deviation                                        750 (OK=750    KO=-     )
> response time 50th percentile                       2544 (OK=2544   KO=-     )
> response time 75th percentile                       2946 (OK=2946   KO=-     )
> response time 95th percentile                       3260 (OK=3260   KO=-     )
> response time 99th percentile                       3306 (OK=3306   KO=-     )
> mean requests/sec                                     50 (OK=50     KO=-     )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                            12 (  6%)
> 800 ms < t < 1200 ms                                  10 (  5%)
> t > 1200 ms                                          178 ( 89%)
> failed                                                 0 (  0%)
================================================================================