【问题标题】:Difference in sent bytes and connect time for Java and HTTP Client 4 implemenation in JMeterJMeter 中 Java 和 HTTP Client 4 实现的发送字节和连接时间的差异
【发布时间】:2019-02-19 15:35:26
【问题描述】:

我正在使用 Jmeter 进行 webservice -Restful 测试。

我收到以下错误:

软件导致连接中止:socket write error

对于 post 方法,我发送大小为 1MB 的 JSON 请求并使用 HTTPclient4 实现。

后来我尝试使用 Java 实现,我得到了成功的响应,但发送的字节数对于 Java 为 0,而对于 HTTPclient4 则非常高。

采样器结果:

HTTPclient4

Thread Name: Thread Group 1-1
Sample Start: 2019-02-19 10:00:57 EST
Load time: 770
Connect Time: 295
Latency: 770
Size in bytes: 151
Sent bytes:1112854
Headers size in bytes: 151
Body size in bytes: 0
Sample Count: 1
Error Count: 0
Data type ("text"|"bin"|""): 
Response code: 200
Response message: OK


HTTPSampleResult fields:
ContentType: 
DataEncoding: null

采样器结果:

JAVA 实现:

Thread Name: Thread Group 1-1
Sample Start: 2019-02-19 10:06:08 EST
Load time: 217
Connect Time: 0
Latency: 217
Size in bytes: 151
Sent bytes:0
Headers size in bytes: 151
Body size in bytes: 0
Sample Count: 1
Error Count: 0
Data type ("text"|"bin"|""): 
Response code: 200
Response message: OK


HTTPSampleResult fields:
ContentType: 
DataEncoding: null

JAVA 实现的工作原理以及为什么 jmeter 中 JAVA 实现的字节大小为 0。

请帮帮我

【问题讨论】:

    标签: java jmeter


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多