简体   繁体   English

计算HTTP请求发布的大小(以字节为单位)

[英]Calculating the size in bytes of HTTP Request Post

I am using JMeter to test a http server and sending in different sizes of load in the Body. 我正在使用JMeter测试http服务器,并在正文中发送不同大小的负载。 I am posting content-type JSON Object and send very big files, and sometimes small. 我正在发布内容类型的JSON对象,并发送很大的文件,有时很小。

In the request, the content-length varies accordingly to what I set but for whatever reason, the Size in bytes is always 277 regardless of the size of the json object and the varying values for content-length. 在请求中,内容长度会随我设置的内容而变化,但是由于任何原因,无论json对象的大小和内容长度的变化值如何,字节大小始终为277。 Why isn't the size in bytes changing along with the change in size of the body that is being sent? 为什么以字节为单位的大小不随发送的正文的大小而变化? This is messing up the KB/sec value that is being calculated in Jmeter because the number of bytes per message is showing 277 every time even though the body is changing. 这弄乱了Jmeter中正在计算的KB / sec值,因为即使主体在变化,每次消息的字节数每次也显示277。

Does anyone know why this is happening or how I can calculate the actual KB/Sec being sent 有谁知道为什么会这样或我如何计算实际发送的KB /秒

I've never faced with same case in JMeter, but when I recently ran my JMeter script in the load testing cloud , I noticed that Kb/s value was look like real. 我从来没有在JMeter中遇到过相同的情况,但是当我最近在负载测试云中运行我的JMeter脚本时,我注意到Kb / s值看起来很真实。 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM