Reputation: 399
I am capturing elapsed time in simple variable in Jmeter and the value is saved in milliseconds, but I need to convert that value into minutes? Is there any way to do this in JMeter?
Upvotes: 0
Views: 1292
Reputation:
Instead, you could probably just use some simple math: Convert Milliseconds To Hours, Minutes, And Seconds
Upvotes: 1
Reputation: 168147
Given your variable name is elapsed
you can convert milliseconds to minutes by dividing its value by 1000 (convert from ms to seconds) followed by dividing by 60 (convert seconds to minutes) via i.e. __jexl3() function which allows executing arbitrary JEXL expressions like:
${__jexl3(${elapsed} / 1000 / 60,elapsed)}
The above function will convert the value from ${elapsed}
variable to minutes and write it back into ${elapsed}
variable.
Upvotes: 1