int count = 0;
   protected void chartVariableBenchmark(String bmName, String variableName, String xLabel, String yLabel, String title, String imageFileName)      throws Exception   {      log.info("Charting benchmark:" + bmName);      Benchmark bm = pm.getBenchmark(bmName);            if (bm == null)      {         return;      }            XYSeriesCollection dataset = new XYSeriesCollection();            //We chart each execution on a different graph - we could instead overlay them on the same graph      Iterator executions = bm.getExecutions().iterator();      int count = 0;      while (executions.hasNext())      {         Execution exec = (Execution)executions.next();                  XYSeries series1 = new XYSeries(exec.getProvider() + " on " + exec.getDate());                  Iterator measurements = exec.getMeasurements().iterator();         while (measurements.hasNext())         {            Measurement measurement = (Measurement)measurements.next();            double variable = measurement.getVariableValue(variableName);                        series1.add(new Double(variable), measurement.getValue());                       }                         dataset.addSeries(series1);                             }            JFreeChart chart = ChartFactory.createXYLineChart(            bmName + " - " + title,            xLabel,            yLabel,            dataset,            PlotOrientation.VERTICAL,            true,             true,             false            );            createImage(chart, imageFileName);         }