- measure("Txs:"+ txNum + " Writes:" + innerNum, new Callable<Void>() {
- @Override
- public Void call() throws Exception {
- int i = 0;
- for (DOMDataReadWriteTransaction writeTx :transactions) {
- // Writes /test/outer-list/i in writeTx
- YangInstanceIdentifier path = YangInstanceIdentifier.builder(outerListPath(i))
- .node(TestModel.INNER_LIST_QNAME).build();
- writeTx.put(OPERATIONAL, path, ImmutableNodes.mapNodeBuilder(TestModel.INNER_LIST_QNAME).build());
- for (int j = 0; j < innerNum; j++) {
- YangInstanceIdentifier innerPath = YangInstanceIdentifier.builder(path)
- .nodeWithKey(TestModel.INNER_LIST_QNAME, TestModel.NAME_QNAME, String.valueOf(j))
- .build();
- writeTx.put(
- OPERATIONAL,
- innerPath,
- ImmutableNodes.mapEntry(TestModel.INNER_LIST_QNAME, TestModel.NAME_QNAME,
- String.valueOf(j)));
- }
- i++;
+ measure("Txs:" + txNum + " Writes:" + innerNum, (Callable<Void>) () -> {
+ int index = 0;
+ for (DOMDataReadWriteTransaction writeTx : transactions) {
+ // Writes /test/outer-list/i in writeTx
+ YangInstanceIdentifier path = YangInstanceIdentifier.builder(outerListPath(index))
+ .node(TestModel.INNER_LIST_QNAME).build();
+ writeTx.put(OPERATIONAL, path, ImmutableNodes.mapNodeBuilder(TestModel.INNER_LIST_QNAME).build());
+ for (int j = 0; j < innerNum; j++) {
+ YangInstanceIdentifier innerPath = YangInstanceIdentifier.builder(path)
+ .nodeWithKey(TestModel.INNER_LIST_QNAME, TestModel.NAME_QNAME, String.valueOf(j)).build();
+ writeTx.put(OPERATIONAL, innerPath, ImmutableNodes
+ .mapEntry(TestModel.INNER_LIST_QNAME, TestModel.NAME_QNAME, String.valueOf(j)));