long totalTimeTaken = results[0].getTestTime() + results[0].getInitTime() - results[1].getInitTime();
long totalTimeTaken = results[0].testTime + results[0].initTime - results[1].initTime;
   public void testTopicScale3()   {      log.info("Running test testTopicScale3");            warmupDestination(topicName, standardMessageSize, false, DeliveryMode.NON_PERSISTENT, Session.AUTO_ACKNOWLEDGE);            Execution execution = createExecution("TopicScale3");                  for (int i = 1; i <= scaleNumber; i++)      {         log.trace("Running with " + i + " consumer(s)");                  SenderJob sender = createDefaultSenderJob(topicName);         sender.setNumMessages(numMessages);         sender.setMsgSize(standardMessageSize);         sender.setMf(new BytesMessageMessageFactory());         sender.setTransacted(false);         sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);                      sender.setInitialPause(initialPause); //enough time for receiver to get ready         sender.setNumMessages(numMessages);               ReceiverJob receiver = createDefaultReceiverJob(topicName);         receiver.setAckMode(Session.AUTO_ACKNOWLEDGE);         receiver.setTransacted(false);         receiver.setNumConnections(1);         receiver.setNumSessions(i);         receiver.setNumMessages(numMessages);                                    JobTimings[] results = runJobs(new Job[] {receiver, sender});                  /*          * 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 totalTimeTaken = results[0].getTestTime() + results[0].getInitTime() - results[1].getInitTime();                  int totalMessages = numMessages;                  Measurement measure = new Measurement("throughput", 1000 * (double)totalMessages / totalTimeTaken);         measure.setVariableValue("numberOfSubscribers", i);         execution.addMeasurement(measure);      }            pm.saveExecution(execution);                  log.info("Test testTopicScale3 finished");         }