*/
private int doBenchmark(int renderThreads) {
System.setProperty("java.awt.headless", "true");
RenderContext renderContext = new RenderContext(options);
BenchmarkManager benchmark = new BenchmarkManager(renderContext,
new ConsoleRenderListener());
benchmark.start();
try {
benchmark.join();
BenchmarkDialog.recordBenchmarkScore(benchmark.getSceneName(),
benchmark.getScore());
System.out.println("Benchmark completed with score " + benchmark.getScore() +
" (" + benchmark.getSceneName() + ")");
return 0;
} catch (InterruptedException e) {
System.err.println("Benchmarking interrupted");
return 1;
}