addToGraph = true;
xReady = true;
   protected void chartExecution(XYSeriesCollection dataset, Execution execution,                                 ProviderToSeriesIndexMapper providerToSeries,                                 GraphInfo graphInfo) throws Exception   {      log.info("Charting " + execution);      String providerName = execution.getProviderName();      AxisInfo xAxis = graphInfo.getAxisInfo(GraphInfo.X);      AxisInfo yAxis = graphInfo.getAxisInfo(GraphInfo.Y);      String seriesDescription =         generateSeriesDescription(dataset, providerName, execution.getStartDate());      XYSeries series = new XYSeries(seriesDescription);      outer:for(Iterator i = execution.iterator(); i.hasNext(); )      {         List measurement = (List)i.next();         double x = 0, y = 0;         // TODO this won't work for multiple identical jobs, and also for more than one         //      parallel jobs         for(Iterator j = measurement.iterator(); j.hasNext(); )         {            Result result = (Result)j.next();            if (result instanceof Failure)            {               // ignore this measurment               continue outer;            }            Job job = (Job)result.getRequest();            boolean addToGraph = false;            if (job.getType() == xAxis.getJobType())            {               if (xAxis.isResult())               {                  // TODO basically we're ignoring that we can also want the number of messages                  x = ((ThroughputResult)result).getThroughput();                  log.debug("recording " + x + " on the x axis, as result");               }               else               {                  // TODO basically we're ignoring anything else but rates                  x = job.getRate();                  log.debug("recording " + x + " on the x axis");               }               addToGraph = true;            }            if (job.getType() == yAxis.getJobType())            {               if (yAxis.isResult())               {                  // TODO basically we're ignoring that we can also want the number of messages                  y = ((ThroughputResult)result).getThroughput();                  log.debug("recording " + y + " on the y axis, as result");               }               else               {                  // TODO basically we're ignoring anything else but rates                  y = job.getRate();                  log.debug("recording " + y + " on the y axis");               }               addToGraph = true;            }            if (addToGraph)            {               series.add(x, y);            }         }      }      dataset.addSeries(series);      providerToSeries.newSeries(providerName);   }