Is there a warm-up issue with sending a timestamp to the post body?

Hi, all.

I am trying to send the current timestamp in the http post body for my test case issue.

This current timestamp is subscribed to the websocket and is used to get the duration between the two ends.

However, the current timestamp of the post body is stamped too quickly, so the duration between the two ends is too long.

Actually, the http request ends quickly in 30ms, but if you check it for debugging, you can see that the two timestamps are more than 1 second apart.

Also, if pause is added 10 seconds before the http request, the difference between the
two timestamps is more than 10 seconds.

I think timestamp (createLocalTimeNow) doesn’t work lazy in http body.

Anyone have any ideas on this?

Thanks for reading the long article :slight_smile:

Your code is broken.

createLocalTimeNow is a lazy val, meaning it’s evaluated once on first use. First use here is when the String passed to StringBody = when the Simulation is instantiated, not when some virtual users send this request.

Use the currentTimeMillis() built-in Expression Language for this.

Thanks you! I was able to solve this problem :slight_smile:

2021년 3월 22일 (월) 오후 7:35, Stéphane LANDELLE <>님이 작성: