try {
exporter = (MeasurementsExporter) Class.forName(exporterStr).getConstructor(OutputStream.class).newInstance(out);
} catch (Exception e) {
System.err.println("Could not find exporter " + exporterStr + ", will use default text reporter.");
e.printStackTrace();
exporter = new TextMeasurementsExporter(out);
}
exporter.write("OVERALL", "RunTime(ms)", runtime);
double throughput = 1000.0 * ((double) opcount) / ((double) runtime);
exporter.write("OVERALL", "Throughput(ops/sec)", throughput);