long minTimeOfFirstSend = results[i].getInitTime();
long minTimeOfFirstSend = results[i].initTime;
   public void testTopicScale2()   {      log.info("Running test testTopicScale2");            warmupDestination(this.topicName, standardMessageSize, false, DeliveryMode.NON_PERSISTENT, Session.AUTO_ACKNOWLEDGE);                  Execution execution = createExecution("TopicScale2");            for (int i = 1; i <= scaleNumber; i++)      {         log.trace("Running with " + i + " connection(s)");                  //Create the jobs                  Job[] jobs = new Job[i + 1];                  //One sender - many receivers                  for (int j = 0; j < i; j++)         {                     ReceiverJob receiver = createDefaultReceiverJob(this.topicName);            jobs[j] = receiver;                        receiver.setAckMode(Session.AUTO_ACKNOWLEDGE);            receiver.setTransacted(false);            receiver.setNumMessages(numMessages);            receiver.setSlaveURL(slaveURLs[j % this.numSlaves]);         }                  SenderJob sender = createDefaultSenderJob(this.topicName);         jobs[i] = sender;         sender.setNumMessages(numMessages);         sender.setMsgSize(standardMessageSize);         sender.setMf(new BytesMessageMessageFactory());         sender.setTransacted(false);         sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);         sender.setSlaveURL(slaveURLs[i % this.numSlaves]);         sender.setInitialPause(initialPause);                  JobTimings[] results = runJobs(jobs);                  /*          * NB.          * When we calculating the total time taken from first send to last receive, there is some          * error involved due to the differences in network latency and other remoting overhead          * when sending the jobs to be executed on potentially different remote machines.          * We make the assumption that this this difference is very small compared with time taken          * to run the tests as to be negligible.          */                  long minTimeOfFirstSend = results[i].getInitTime();         long maxTimeOfLastReceive = Long.MIN_VALUE;         for (int j = 0; j < i; j++)         {            //JobTimings senderResult = results[j * 2];            JobTimings receiverResult = results[j];            //long timeOfFirstSend = senderResult.getInitTime();            //minTimeOfFirstSend = Math.min(minTimeOfFirstSend, timeOfFirstSend);            long timeOfLastReceive = receiverResult.getInitTime() + receiverResult.getTestTime();            maxTimeOfLastReceive = Math.max(maxTimeOfLastReceive, timeOfLastReceive);         }                  long totalTimeTaken = maxTimeOfLastReceive - minTimeOfFirstSend;                  Measurement measure = new Measurement("throughput", 1000 * (double)numMessages / totalTimeTaken);         measure.setVariableValue("numberOfConnections", i);         execution.addMeasurement(measure);      }            pm.saveExecution(execution);            log.info("Test testTopicScale2 finished");         }