0
votes

I have created a Jmeter Transaction Controller that run a HTTP sampler under while loop having 8 regular expression extractors. I want to track the start time and complete time of each regex match. Using Response Time i am able to get time stamp but i am confused whether its start time stamp or stop time stamp, Also how i can track the timestamp of regex match in while loop. I have written a beanshell script to write data to csv file as soon as match is found but not able to find out the Jmeter CTX API name that can help me track the time of transaction controller.

I am think about, adding a preprocessor to track starttime but what would be the API name for the timestamp match for regex. Is it getTime() or I simply use ${__time(dd/MM/yyyy HH:mm:ss a)} in my script against each regex match

Screenshot below:

enter image description here

1

1 Answers

0
votes

I believe the fastest and the easiest way is just enabling debugging for the Regular Expression extractor.

Add the next line to log4j2.xml file (lives under "bin" folder of your JMeter installation), the line should go to the <Loggers> section

<Logger name="org.apache.jmeter.extractor.RegexExtractor" level="debug" />

JMeter restart will be required to pick the setting up. Once done you should be able to see debugging information from the Regular Expression Extractor in the jmeter.log file, it will contain the timestamps.

JMeter Regular Expression Extractor

As you can see, in my case Regular Expression Extractor took 15 ms.

You can also set/override logging level via -L command-line argument.


NB: the above instructions are applicable to JMeter version 3.2 and onwards.