apache / apache/jmeter

HTTP Request : provide a way to not compute MD5 nor use response, only use size

Open
#3,546 2 comments 0 reactions 0 assignees View on GitHub
enhancement need info os: All P2
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**Vamsi Mohan Tirunagari** ([Bug 57633](https://bz.apache.org/bugzilla//show_bug.cgi?id=57633&redirect=false)):
Situation:

I am doing performance testing using JMeter and my focus of testing is to measure performance of file upload and download of the server. The file sizes ranges for smaller files like 4KB to large files like 2GB.

While doing PUT testing, I had varied file ranges of 4KB to 1GB. PUT for sizes of 4KB and 1.6MB is working perfectly. However, the next size of 100MB and greater than that (500MB and 1GB) are failing. There is no apparent error seen in JMeter logs or console, but when I captured wireshark trace, I could see that TCP threeway handshake was successful, followed by HTTP PUT with right content length and then some data tranfer. However, after certain data transfer, there are no more transfers. Wireshark does not capture any further transfer. So, my Server Under Test times out and closes the connection as complete file is not received.

JMeter Build:
I am using JMeter 2.12 r1636949.

Note: I have modified certain part of code in JMeter to handle GET request. Though I do not think these below changes have resulted in problem I see in PUT, I just wanted to mention this as an FYI.

To enhance the performance of GET on client, I made modifications to JMeter code to ignore the data coming to client by not calculating MD5 hash. I only validate the status code received for GET.

Following changes are done:

HTTPSamplerBase.java:

Method Name: public byte[] readResponse
Code Changed:
if (asMD5) { // && md != null)
//md.update(readBuffer, 0 , bytesRead);
totalBytes += bytesRead;
} else {
w.write(readBuffer, 0, bytesRead);
}
}
if (first){ // https://github.com/apache/jmeter/issues/2207 - if there was no data, still need to set latency
sampleResult.latencyEnd();
}
in.close();
w.flush();
if (asMD5) { //&& md != null)
byte[] md5Result = new byte[1]; //md.digest();
w.write(JOrphanUtils.baToHexBytes(md5Result));
sampleResult.setBytes(totalBytes);
}

Attachments to this bug:

JMeter Logs, Base and modified file of HTTPSampler.java, Wireshark Capture, jmx file.

*** This issue is currently blocking my testing commitments and hence request to take this up with priority****

Please let me know for any further information.

Created attachment [JMeter_Put_Bug.zip](https://apache.github.io/jmeter-bugzilla-attachments/33/57633/32520/JMeter_Put_Bug.zip): Logs contains JMeter Logs, Base and modified file of HTTPSampler.java, Wireshark Capture, jmx file.

OS: All

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.