@Ignore("Multi-threaded not faster for some reason in CI") //todo investigate
public void executionShouldBeFasterWhenExecutedInMultipleThreads() {
final BatchTransactionExecutor singleThreadedBatchExecutor = new NoInputBatchTransactionExecutor(database, 100, 40000, CreateNode.getInstance());
final BatchTransactionExecutor multiThreadedBatchExecutor = new MultiThreadedBatchTransactionExecutor(new NoInputBatchTransactionExecutor(database, 100, 40000, CreateNode.getInstance()), 4);
long singleThreadedTime = time(new Timed() {
@Override
public void time() {
singleThreadedBatchExecutor.execute();
}
});
long multiThreadedTime = time(new Timed() {
@Override
public void time() {
multiThreadedBatchExecutor.execute();
}
});