builder.addPartitionInfo("blah", "ival");
// this is a NOOP as builder will only honor it if there is
// and accompanying call to builder.addExport
builder.setTableAsExportOnly("blah");
LocalCluster cluster = new LocalCluster("latencycheck.jar",
2, 1, 0, BackendTarget.NATIVE_EE_JNI);
cluster.setHasLocalServer(true);
boolean success = cluster.compile(builder);
assert(success);
cluster.startUp(true);
final String listener = cluster.getListenerAddresses().get(0);
final Client client = ClientFactory.createClient();
client.createConnection(listener);
long iterations = 10000;
long start = System.nanoTime();
for (int i = 0; i < iterations; i++) {
client.callProcedure("Insert", i);
}
long end = System.nanoTime();
double ms = (end - start) / 1000000.0;
client.close();
cluster.shutDown();
System.out.printf("Avg latency was %.3f ms.\n", ms / iterations);
}
catch (Exception e) {