Currently I'm struggling with getting desirable JMeter reports from java code. My goal is to get latency and throughput logged into file for each transaction and then have a summary per each scenario with averages and max/min values for latency and throughput.
Currently I have this code for reports:
ResultCollector csvlogger = new ResultCollector(summer);
csvlogger.setFilename(csvLogFile);
testPlanTree.add(testPlanTree.getArray()[0], csvlogger);
But in this way it logs info only per one transaction and there is no throughput, and latency reported is simply 0 (without any decimal part). It looks like this:
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,Latency,IdleTime,Connect
2017/06/28 08:53:49.276,1014,Jedis Sampler,200,OK,Jedis Thread Group 1-1,text,true,,0,0,1,1,0,0,0
Does anyone know is there any way how I can tune it?
Thanks!