i have timestamp values in a csv file and i'm loading the file in a ThreadgGoup in jMeter. I'm using a JSR223 script to calculate the delay time between each thread but i'm having trouble doing that.
I want to launch my threads based no real life data, that's why i'm using the timestamps from a csv log file. but i don't know how to configure the equation for this. I'm reading the timestamp from the csv in my script and i know that the wait time should equal the current timestamp value - previous thread timestamp value but how can i implement this?
def long wait=0;
// this returns the currents threads timestamp value from the csv
def long ts = Double.valueOf(vars.get("timestamp")).longValue();
wait = ts - {previous timestamp in csv}
return wait;
I'm using groovy to write the scripts and in my threadgroup i have the httpRequest and in it the JSR223 Timer. Any thoughts?