long timeOfFirstSend = senderResult.startTime;
long timeOfFirstSend = senderResult.getStartTime();
   public void testQueueScale1()   {      log.info("Running test testQueueScale1");            Execution execution = createExecution("QueueScale1");            for (int i = 1; i <= scaleNumber; i++)      {         log.trace("Running with " + i + " queue(s)");                      //Create the jobs                  Job[] jobs = new Job[2 * i];                  for (int j = 0; j < i; j++)         {                     SenderJob sender = createDefaultSenderJob(queueNamePrefix + j);            jobs[j * 2] = sender;            sender.setNumMessages(numMessages);            sender.setMsgSize(standardMessageSize);            sender.setMf(new TextMessageMessageFactory());            sender.setTransacted(false);            sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);            sender.setSlaveURL(slaveURLs[j % this.numSlaves]);                     ReceiverJob receiver = createDefaultReceiverJob(queueNamePrefix + j);            jobs[j * 2 + 1] = receiver;                        receiver.setAckMode(Session.AUTO_ACKNOWLEDGE);            receiver.setTransacted(false);            receiver.setNumMessages(numMessages);            receiver.setSlaveURL(slaveURLs[j % this.numSlaves]);         }                  JobResult[] results = runJobs(jobs);                  if (!checkResults(results, "QueueScale1"))         {            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("numberOfQueues", i);         execution.addMeasurement(measure);               }            pm.saveExecution(execution);            log.info("Test testQueueScale1 finished");         }