if (!checkResults(results, "TopicScale3")) { return; }  long totalTimeTaken = results[1].endTime - results[0].endTime;
long totalTimeTaken = results[1].getEndTime() - results[0].getEndTime();
   public void testTopicScale3()   {      log.info("Running test testTopicScale3");            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 TextMessageMessageFactory());         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);                                   JobResult[] results = runJobs(new Job[] {receiver, sender});                  if (!checkResults(results, "TopicScale3"))         {            return;         }                  long totalTimeTaken = results[1].endTime - results[0].endTime;                  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");         }