如何获取http请求的响应时间差(例如Request1-响应时间,Response 2 -Response时间)并写入CSV文件?我尝试过,但是正在调用评估外壳错误
long request2 = prev.getTime();
// get HTTP Sampler 2 execution time
long request1 = Long.parseLong(vars.get("LaunchPage"));
// get HTTP Sampler 1 execution time from variable
long delta = (request1 - request2);
// calculate difference
log.info("Time difference is: " + difference + " ms");
// print difference to jmeter.log file
FileWriter fstream = new FileWriter("E:/Kohls/TestData.csv",true //
FileOutputStream out = new FileOutputStream("e://delta.csv", true);
out.write((String.valueOf(delta)).getBytes("UTF-8"));