This patch adds statistics-keeping to tell-based protocol code.
Change-Id: I377cd4d9075f96dc69dd74011458fdcf53a65add
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
a21acd04ac162c1eb84a997ae0c9ac9df185422c)
throws RequestException {
if (request instanceof CommitLocalTransactionRequest) {
LOG.debug("{}: allocating new ready transaction {}", persistenceId(), id);
throws RequestException {
if (request instanceof CommitLocalTransactionRequest) {
LOG.debug("{}: allocating new ready transaction {}", persistenceId(), id);
+ tree.getStats().incrementReadWriteTransactionCount();
return createReadyTransaction(id, ((CommitLocalTransactionRequest) request).getModification());
}
if (request instanceof AbstractReadTransactionRequest) {
if (((AbstractReadTransactionRequest<?>) request).isSnapshotOnly()) {
LOG.debug("{}: allocatint new open snapshot {}", persistenceId(), id);
return createReadyTransaction(id, ((CommitLocalTransactionRequest) request).getModification());
}
if (request instanceof AbstractReadTransactionRequest) {
if (((AbstractReadTransactionRequest<?>) request).isSnapshotOnly()) {
LOG.debug("{}: allocatint new open snapshot {}", persistenceId(), id);
+ tree.getStats().incrementReadOnlyTransactionCount();
return createOpenSnapshot(id);
}
}
LOG.debug("{}: allocating new open transaction {}", persistenceId(), id);
return createOpenSnapshot(id);
}
}
LOG.debug("{}: allocating new open transaction {}", persistenceId(), id);
+ tree.getStats().incrementReadWriteTransactionCount();
return createOpenTransaction(id);
}
return createOpenTransaction(id);
}
import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
import org.opendaylight.controller.cluster.datastore.DataTreeCohortActorRegistry.CohortRegistryCommand;
import org.opendaylight.controller.cluster.datastore.ShardDataTreeCohort.State;
import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
import org.opendaylight.controller.cluster.datastore.DataTreeCohortActorRegistry.CohortRegistryCommand;
import org.opendaylight.controller.cluster.datastore.ShardDataTreeCohort.State;
+import org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard.ShardStats;
import org.opendaylight.controller.cluster.datastore.persisted.AbortTransactionPayload;
import org.opendaylight.controller.cluster.datastore.persisted.AbstractIdentifiablePayload;
import org.opendaylight.controller.cluster.datastore.persisted.CloseLocalHistoryPayload;
import org.opendaylight.controller.cluster.datastore.persisted.AbortTransactionPayload;
import org.opendaylight.controller.cluster.datastore.persisted.AbstractIdentifiablePayload;
import org.opendaylight.controller.cluster.datastore.persisted.CloseLocalHistoryPayload;
runOnPendingTransactionsComplete = null;
}
}
runOnPendingTransactionsComplete = null;
}
}
+
+ ShardStats getStats() {
+ return shard.getShardMBean();
+ }