use of org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort in project controller by opendaylight.
the class AbstractInMemoryDatastoreWriteTransactionBenchmark method write100KSingleNodeWithOneInnerItemInCommitPerWriteBenchmark.
@Benchmark
@Warmup(iterations = WARMUP_ITERATIONS, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = MEASUREMENT_ITERATIONS, timeUnit = TimeUnit.MILLISECONDS)
public void write100KSingleNodeWithOneInnerItemInCommitPerWriteBenchmark() throws Exception {
for (int outerListKey = 0; outerListKey < OUTER_LIST_100K; ++outerListKey) {
DOMStoreReadWriteTransaction writeTx = domStore.newReadWriteTransaction();
writeTx.write(OUTER_LIST_100K_PATHS[outerListKey], OUTER_LIST_ONE_ITEM_INNER_LIST[outerListKey]);
DOMStoreThreePhaseCommitCohort cohort = writeTx.ready();
cohort.canCommit().get();
cohort.preCommit().get();
cohort.commit().get();
}
}
use of org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort in project controller by opendaylight.
the class AbstractInMemoryDatastoreWriteTransactionBenchmark method write50KSingleNodeWithTwoInnerItemsInOneCommitBenchmark.
@Benchmark
@Warmup(iterations = WARMUP_ITERATIONS, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = MEASUREMENT_ITERATIONS, timeUnit = TimeUnit.MILLISECONDS)
public void write50KSingleNodeWithTwoInnerItemsInOneCommitBenchmark() throws Exception {
DOMStoreReadWriteTransaction writeTx = domStore.newReadWriteTransaction();
for (int outerListKey = 0; outerListKey < OUTER_LIST_50K; ++outerListKey) {
writeTx.write(OUTER_LIST_50K_PATHS[outerListKey], OUTER_LIST_TWO_ITEM_INNER_LIST[outerListKey]);
}
DOMStoreThreePhaseCommitCohort cohort = writeTx.ready();
cohort.canCommit().get();
cohort.preCommit().get();
cohort.commit().get();
}
use of org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort in project controller by opendaylight.
the class AbstractInMemoryDatastoreWriteTransactionBenchmark method write50KSingleNodeWithTwoInnerItemsInCommitPerWriteBenchmark.
@Benchmark
@Warmup(iterations = WARMUP_ITERATIONS, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = MEASUREMENT_ITERATIONS, timeUnit = TimeUnit.MILLISECONDS)
public void write50KSingleNodeWithTwoInnerItemsInCommitPerWriteBenchmark() throws Exception {
for (int outerListKey = 0; outerListKey < OUTER_LIST_50K; ++outerListKey) {
DOMStoreReadWriteTransaction writeTx = domStore.newReadWriteTransaction();
writeTx.write(OUTER_LIST_50K_PATHS[outerListKey], OUTER_LIST_TWO_ITEM_INNER_LIST[outerListKey]);
DOMStoreThreePhaseCommitCohort cohort = writeTx.ready();
cohort.canCommit().get();
cohort.preCommit().get();
cohort.commit().get();
}
}
use of org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort in project controller by opendaylight.
the class AbstractInMemoryDatastoreWriteTransactionBenchmark method write100KSingleNodeWithOneInnerItemInOneCommitBenchmark.
@Benchmark
@Warmup(iterations = WARMUP_ITERATIONS, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = MEASUREMENT_ITERATIONS, timeUnit = TimeUnit.MILLISECONDS)
public void write100KSingleNodeWithOneInnerItemInOneCommitBenchmark() throws Exception {
DOMStoreReadWriteTransaction writeTx = domStore.newReadWriteTransaction();
for (int outerListKey = 0; outerListKey < OUTER_LIST_100K; ++outerListKey) {
writeTx.write(OUTER_LIST_100K_PATHS[outerListKey], OUTER_LIST_ONE_ITEM_INNER_LIST[outerListKey]);
}
DOMStoreThreePhaseCommitCohort cohort = writeTx.ready();
cohort.canCommit().get();
cohort.preCommit().get();
cohort.commit().get();
}
use of org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort in project controller by opendaylight.
the class AbstractInMemoryDatastoreWriteTransactionBenchmark method initTestNode.
protected void initTestNode() throws Exception {
final YangInstanceIdentifier testPath = YangInstanceIdentifier.builder(BenchmarkModel.TEST_PATH).build();
DOMStoreReadWriteTransaction writeTx = domStore.newReadWriteTransaction();
writeTx.write(testPath, provideOuterListNode());
DOMStoreThreePhaseCommitCohort cohort = writeTx.ready();
cohort.canCommit().get();
cohort.preCommit().get();
cohort.commit().get();
}
Aggregations