instance.add(res);
SampleResult res2 = new SampleResult();
instance.add(res2);
ResultCollector rc = new ResultCollector();
rc.setListener(instance);
rc.sampleOccurred(new SampleEvent(res, ""));
rc.sampleOccurred(new SampleEvent(res2, ""));
File f = File.createTempFile("test", ".csv");
instance.getGraphPanelChart().saveGraphToCSV(f);
}