execution.addMeasurement(new Measurement("messagesPerSec", 1000 * (double)numMessages / result.testTime));
execution.addMeasurement(new Measurement("messagesPerSec", 1000 * (double)numMessages / (result.endTime - result.startTime)));
   public void testQueue17()   {      log.info("Running test Queue17");            try      {                  //Now fill it with numMessages messages         FillJob fillJob = createDefaultFillJob(queueName, numMessages);         fillJob.setDeliveryMode(DeliveryMode.PERSISTENT);         fillJob.setMsgSize(standardMessageSize);         fillJob.setMf(new BytesMessageMessageFactory());         runJob(fillJob);                  BrowserJob job  = createDefaultBrowserJob(queueName);         JobResult result = runJob(job);                  if (!checkResult(result, "Queue17"))         {            return;         }                  Execution execution = createExecution("Queue17");                  execution.addMeasurement(new Measurement("messagesPerSec", 1000 * (double)numMessages / result.testTime));         pm.saveExecution(execution);                  log.info("Test Queue17 finished");      }      finally      {         drainQueue(queueName);      }   }