long timeOfFirstSend = senderResult.startTime;
long timeOfFirstSend = senderResult.getStartTime();
   public void testTopicScale2()   {      log.info("Running test testTopicScale2");                  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 TextMessageMessageFactory());         sender.setTransacted(false);         sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);         sender.setSlaveURL(slaveURLs[i % this.numSlaves]);         sender.setInitialPause(initialPause);                  JobResult[] results = runJobs(jobs);                  if (!checkResults(results, "TopicScale2"))         {            return;         }         long minTimeOfFirstSend = Long.MAX_VALUE;         long maxTimeOfLastReceive = Long.MIN_VALUE;         for (int j = 0; j < i; j++)         {            JobResult senderResult = results[j * 2];            JobResult receiverResult = results[j * 2 + 1];            long timeOfFirstSend = senderResult.startTime;            minTimeOfFirstSend = Math.min(minTimeOfFirstSend, timeOfFirstSend);            long timeOfLastReceive = receiverResult.endTime;            maxTimeOfLastReceive = Math.max(maxTimeOfLastReceive, timeOfLastReceive);         }                  long totalTimeTaken = maxTimeOfLastReceive - minTimeOfFirstSend;         long totalMessagesSent = i * numMessages;                  Measurement measure = new Measurement("throughput", 1000 * ((double)totalMessagesSent) / totalTimeTaken);         measure.setVariableValue("numberOfConnections", i);         execution.addMeasurement(measure);               }            pm.saveExecution(execution);            log.info("Test testTopicScale2 finished");         }