【发布时间】:2018-11-01 02:28:55
【问题描述】:
当我在邮递员中为 1000 条记录运行相同的 API 时,我正在尝试测试 API Get 方法,响应时间为 4 秒(在 Windows 7 中安装邮递员并运行测试),而在 JMeter 中则需要 22 秒,知道这可能是什么原因吗?
JMeter 运行的步骤:
- 图形界面模式
- 非 GUI 模式
Postman 和 JMeter 在同一个系统/网络中。
下面是Jmeter结果:
Thread Name: Test/TestAPI 1-1
Sample Start: 2018-05-22 17:15:00 IST
Load time: **21406** // this is the issue , same in postman taking only 4712 ms
Connect Time: 425
Latency: 1990
Size in bytes: 3962439
Sent bytes:1130
Headers size in bytes: 175
Body size in bytes: 3962264
Sample Count: 1
Error Count: 0
Data type ("text"|"bin"|""): text
Response code: 200
Response message: OK
Response headers:HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
api-supported-versions: 1
Date: Tue, 22 May 2018 11:45:06 GMT
Content-Length: 3958179
Server: Web Server
HTTPSampleResult fields:
ContentType: application/json; charset=utf-8
DataEncoding: utf-8
邮差结果:
api-supported-versions →1
content-encoding →gzip
content-type →application/json; charset=utf-8
date →Tue, 22 May 2018 12:00:11 GMT
server →Web Server
transfer-encoding →chunked
vary →Accept-Encoding
【问题讨论】:
-
您能否提供更多详细信息,以及JMeter结果显示什么?
-
我应该提供什么样的信息?请告诉我。 Jmeter 结果显示 200 OK,平均时间为 22112 毫秒(22 秒),如果我运行相同的 API,邮递员显示为 4720 毫秒(4 秒)。 Jmeter 4.0版
-
当您在 JMeter 加速周期(在线程组中)设置为 1000 时会发生什么?
-
仍然需要几乎相同的秒数,即现在 28 秒,线程数:1,Ramp Up:1000,循环计数:1,我的系统配置:i3 CPU @ 3.7 GH 8 GB Ram,64 位
-
您在 JMeter 中缺少标题
content-encoding
标签: performance api jmeter postman performance-testing