public class DsbenchmarkProvider implements BindingAwareProvider, DsbenchmarkService, AutoCloseable {
private static final Logger LOG = LoggerFactory.getLogger(DsbenchmarkProvider.class);
public class DsbenchmarkProvider implements BindingAwareProvider, DsbenchmarkService, AutoCloseable {
private static final Logger LOG = LoggerFactory.getLogger(DsbenchmarkProvider.class);
- private static final InstanceIdentifier<TestExec> TEST_EXEC_IID = InstanceIdentifier.builder(TestExec.class).build();
- private static final InstanceIdentifier<TestStatus> TEST_STATUS_IID = InstanceIdentifier.builder(TestStatus.class).build();
+ private static final InstanceIdentifier<TestExec> TEST_EXEC_IID =
+ InstanceIdentifier.builder(TestExec.class).build();
+ private static final InstanceIdentifier<TestStatus> TEST_STATUS_IID =
+ InstanceIdentifier.builder(TestStatus.class).build();
private final DsbenchmarkListenerProvider listenerProvider = new DsbenchmarkListenerProvider();
private final DOMDataBroker domDataBroker; // Async DOM Broker for use with all DOM operations
private final DsbenchmarkListenerProvider listenerProvider = new DsbenchmarkListenerProvider();
private final DOMDataBroker domDataBroker; // Async DOM Broker for use with all DOM operations
- private final DataBroker bindingDataBroker; // Async Binding-Aware Broker for use in tx chains; initialized to ping-pong
- // broker in default config (see default-config.xml and dsbenchmark-impl.yang)
+ private final DataBroker bindingDataBroker; // Async Binding-Aware Broker for use in tx chains; initialized to
+ // ping-pong broker in default config (see default-config.xml and
+ // dsbenchmark-impl.yang)
private DataBroker dataBroker; // "Legacy" OSGI Data Broker for use in simple transactions
private RpcRegistration<DsbenchmarkService> dstReg;
private long testsCompleted = 0;
private DataBroker dataBroker; // "Legacy" OSGI Data Broker for use in simple transactions
private RpcRegistration<DsbenchmarkService> dstReg;
private long testsCompleted = 0;
// We have to get the DOMDataBroker via the constructor,
// since we can't get it from the session
this.domDataBroker = domDataBroker;
// We have to get the DOMDataBroker via the constructor,
// since we can't get it from the session
this.domDataBroker = domDataBroker;
this.dataBroker = session.getSALService(DataBroker.class);
this.dstReg = session.addRpcImplementation( DsbenchmarkService.class, this );
listenerProvider.setDataBroker(dataBroker);
setTestOperData(this.execStatus.get(), testsCompleted);
this.dataBroker = session.getSALService(DataBroker.class);
this.dstReg = session.addRpcImplementation( DsbenchmarkService.class, this );
listenerProvider.setDataBroker(dataBroker);
setTestOperData(this.execStatus.get(), testsCompleted);
- LOG.info("Data Store cleaned up");
- return Futures.immediateFuture( RpcResultBuilder.<Void> success().build() );
+ LOG.debug("Data Store cleaned up");
+ return Futures.immediateFuture( RpcResultBuilder.<Void>success().build());
LOG.info("Starting the data store benchmark test, input: {}", input);
// Check if there is a test in progress
LOG.info("Starting the data store benchmark test, input: {}", input);
// Check if there is a test in progress
LOG.error( "Test error: {}", e.toString());
execStatus.set( ExecStatus.Idle );
return RpcResultBuilder.success(new StartTestOutputBuilder()
LOG.error( "Test error: {}", e.toString());
execStatus.set( ExecStatus.Idle );
return RpcResultBuilder.success(new StartTestOutputBuilder()
execStatus.set(ExecStatus.Idle);
// Get the number of data change events and cleanup the data change listeners
execStatus.set(ExecStatus.Idle);
// Get the number of data change events and cleanup the data change listeners
long numEvents = listenerProvider.getEventCountAndDestroyListeners();
StartTestOutput output = new StartTestOutputBuilder()
long numEvents = listenerProvider.getEventCountAndDestroyListeners();
StartTestOutput output = new StartTestOutputBuilder()
tx.put(LogicalDatastoreType.CONFIGURATION, TEST_EXEC_IID, data);
try {
tx.submit().checkedGet();
tx.put(LogicalDatastoreType.CONFIGURATION, TEST_EXEC_IID, data);
try {
tx.submit().checkedGet();
- LOG.info("DataStore config test data cleaned up");
- } catch (TransactionCommitFailedException e) {
+ LOG.debug("DataStore config test data cleaned up");
+ } catch (final TransactionCommitFailedException e) {
tx = dataBroker.newWriteOnlyTransaction();
tx.put(LogicalDatastoreType.OPERATIONAL, TEST_EXEC_IID, data);
try {
tx.submit().checkedGet();
tx = dataBroker.newWriteOnlyTransaction();
tx.put(LogicalDatastoreType.OPERATIONAL, TEST_EXEC_IID, data);
try {
tx.submit().checkedGet();
- LOG.info("DataStore operational test data cleaned up");
- } catch (TransactionCommitFailedException e) {
+ LOG.debug("DataStore operational test data cleaned up");
+ } catch (final TransactionCommitFailedException e) {