Reputation: 1367
I am looking to see if it's possible to easily compute the total time taken to complete a Thread Group. In my case, I have a thread with 100 concurrent users with 1 HTTP request. I would like to know how long did it take to complete requests from all 100 users. I tried using Transaction controller with Aggregation Report but it doesn't seem to capture the value across all concurrent users.
Thanks, J
Upvotes: 0
Views: 2442
Reputation: 168072
Put the following Groovy code into "Script" area:
def testStart = new Date(vars.get('TESTSTART.MS') as long)
def testEnd = new Date()
use(groovy.time.TimeCategory) {
def duration = testEnd - testStart
log.info("Test duration: ${duration.seconds}")
}
Once test finishes you will see its duration in seconds in jmeter.log file.
You can also use ${duration.hours}
, ${duration.days}
, etc.
Upvotes: 0