Hi,

Problem description:
I have an MQ-based system which I would like to performance-test with the
following steps:

1. send JMS message to q1 (record its jms timestamp and messageId in a
hashmap)
2. message will be read by the app and replied into another queue,
correlationId set
3. read reply queue, find the correlated message and calculate roundtrip
time

1. and 3. are in separate thread groups, written in JSR223 Groovy

Code snippet:

     if (sendtime>0) {
      dt=recvtime - sendtime;
      log.info(" -> roundtrip time: "+dt);
      SampleResult.setResponseCode("200");
      SampleResult.setSuccessful(true);
      SampleResult.setStartTime(sendtime);
      SampleResult.setEndTime(recvtime);

roundtrip time (dt) is calculated correctly and logged.
However I would like to have graphs drawn about dt by JMeter.
I thought I would like to use this second sampler to draw the graphs.

But the last line of code causes the exception:

2020-04-22 21:49:40,809 ERROR o.a.j.s.SampleResult: sampleEnd called twice
java.lang.Throwable: Invalid call sequence
...

Please help me how to solve the problem.

Thanks,
Akos

Reply via email to