frgirard commented on issue #5733:
URL: https://github.com/apache/jmeter/issues/5733#issuecomment-2076559305

   I'm using a dedicated JSR223 sampler into a loop controller, to create the 
samples I need. The values (start time, end time) are pushed by the main 
sampler to a java.util.concurrent.ConcurrentLinkedQueue and used by this 
sampler. All other samplers are setIgnore().
   It looks like that :
   
   `ConcurrentHashMap<String, String> trep = props.get "map.trep"
   ConcurrentLinkedQueue<String> rq = props.get "reception.queue"
   AtomicInteger skutraites = props.get "sku.count"
   
   String key = rq.poll()
   
   if (key)
   {
     String[] val = trep.get(key).split(",")
     trep.remove(key)
     t_in = Long.parseLong(val[0])
     t_out = Long.parseLong(val[1])
     taille = Integer.parseInt(val[2])
     type = val[3]
   
     skutraites.addAndGet(1)
   
     //log.info "Creating sample ${key}, ${t_in}, ${t_out}, ${taille}"
   
     SampleResult.setSampleLabel(type + "_aggreg")
     SampleResult.setStartTime(t_in)
     SampleResult.setEndTime(t_out)
     //SampleResult.setLatency(latency)
     SampleResult.setBytes(taille as long)
     SampleResult.setResponseMessage(key)
   }
   else
   {
     SampleResult.setIgnore()
     sleep 100
   }
   `


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to