0

(question is continue from Jmeter protobuf testing. Could not read Protobuf message) I am testing application via Protobuf protocol. Initially i used HTTP sampler but was a problem with saving binary data to a string. Solution was to use Beanshell sampler with HTTPClient and POST request with the binary data in body:

byte[] data = null;
//...assign protobuf binary buffer to data...

HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://127.0.0.1");
HttpEntity entity = new ByteArrayEntity(data);
post.setEntity(entity);
post.setHeader(HttpHeaders.CONTENT_TYPE, "application/octet-stream");
HttpResponse response=null;
try {
    response = client.execute(post);
} catch (ClientProtocolException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
} catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

ResponseCode = response.getStatusLine().getStatusCode().toString();
//if some assert is true then
Issuccess = true;
ResponseMessage="Some Response Message";

Because i try to provide the high load with several thousands of concurent users i started to use JSR223+Grovy sampler instead of Beanshell samler (was influenced by this article https://blazemeter.com/blog/beanshell-vs-jsr223-vs-java-jmeter-scripting-its-performance)

During the test all JSR223 sampler have a strong growth of response times: JSR223 sampler response times during first 5 minutes

Then a created a new testplan and just replaced all JSR223 with Beanshell samplers (without reset option). The picture was ok (graph in the same scale):

Beanshell sampler response times during first 5 minutes

So how to recognize what is wrong with JSR223 or maybe to fix it. And another questiong why everybody recomend to use JST223+Grovy when it provides kind of these problems?

Community
  • 1
  • 1
v0devil
  • 462
  • 1
  • 5
  • 19

1 Answers1

0

Ah ok, in this article was recomendation to use Compilation cache key. I have not seen it. Now everything is ok.

v0devil
  • 462
  • 1
  • 5
  • 19