Class ExtendedStatisticInterceptor

All Implemented Interfaces:
Visitor, AsyncInterceptor

@MBean(objectName="ExtendedStatistics", description="Component that manages and exposes extended statistics relevant to transactions.") public class ExtendedStatisticInterceptor extends BaseCustomAsyncInterceptor
Take the statistics about relevant visitable commands.
Since:
6.0
Author:
Roberto Palmieri, Sebastiano Peluso, Diego Didona, Pedro Ruivo
  • Constructor Details

    • ExtendedStatisticInterceptor

      public ExtendedStatisticInterceptor()
  • Method Details

    • visitPutKeyValueCommand

      public Object visitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command) throws Throwable
      Specified by:
      visitPutKeyValueCommand in interface Visitor
      Overrides:
      visitPutKeyValueCommand in class DDAsyncInterceptor
      Throws:
      Throwable
    • visitRemoveCommand

      public Object visitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command) throws Throwable
      Specified by:
      visitRemoveCommand in interface Visitor
      Overrides:
      visitRemoveCommand in class DDAsyncInterceptor
      Throws:
      Throwable
    • visitReplaceCommand

      public Object visitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command) throws Throwable
      Specified by:
      visitReplaceCommand in interface Visitor
      Overrides:
      visitReplaceCommand in class DDAsyncInterceptor
      Throws:
      Throwable
    • visitComputeCommand

      public Object visitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command) throws Throwable
      Specified by:
      visitComputeCommand in interface Visitor
      Overrides:
      visitComputeCommand in class DDAsyncInterceptor
      Throws:
      Throwable
    • visitComputeIfAbsentCommand

      public Object visitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command) throws Throwable
      Specified by:
      visitComputeIfAbsentCommand in interface Visitor
      Overrides:
      visitComputeIfAbsentCommand in class DDAsyncInterceptor
      Throws:
      Throwable
    • visitReadWriteKeyCommand

      public Object visitReadWriteKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyCommand command) throws Throwable
      Specified by:
      visitReadWriteKeyCommand in interface Visitor
      Overrides:
      visitReadWriteKeyCommand in class DDAsyncInterceptor
      Throws:
      Throwable
    • visitGetKeyValueCommand

      public Object visitGetKeyValueCommand(InvocationContext ctx, org.infinispan.commands.read.GetKeyValueCommand command) throws Throwable
      Specified by:
      visitGetKeyValueCommand in interface Visitor
      Overrides:
      visitGetKeyValueCommand in class DDAsyncInterceptor
      Throws:
      Throwable
    • visitGetAllCommand

      public Object visitGetAllCommand(InvocationContext ctx, org.infinispan.commands.read.GetAllCommand command) throws Throwable
      Specified by:
      visitGetAllCommand in interface Visitor
      Overrides:
      visitGetAllCommand in class DDAsyncInterceptor
      Throws:
      Throwable
    • visitPrepareCommand

      public Object visitPrepareCommand(TxInvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command)
      Specified by:
      visitPrepareCommand in interface Visitor
      Overrides:
      visitPrepareCommand in class DDAsyncInterceptor
    • visitCommitCommand

      public Object visitCommitCommand(TxInvocationContext ctx, org.infinispan.commands.tx.CommitCommand command) throws Throwable
      Specified by:
      visitCommitCommand in interface Visitor
      Overrides:
      visitCommitCommand in class DDAsyncInterceptor
      Throws:
      Throwable
    • visitRollbackCommand

      public Object visitRollbackCommand(TxInvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command) throws Throwable
      Specified by:
      visitRollbackCommand in interface Visitor
      Overrides:
      visitRollbackCommand in class DDAsyncInterceptor
      Throws:
      Throwable
    • getAvgPrepareRtt

      @ManagedAttribute(description="Average Prepare Round-Trip Time duration (in microseconds)", displayName="Average Prepare RTT") public double getAvgPrepareRtt()
    • getAvgCommitRtt

      @ManagedAttribute(description="Average Commit Round-Trip Time duration (in microseconds)", displayName="Average Commit RTT") public double getAvgCommitRtt()
    • getAvgRemoteGetRtt

      @ManagedAttribute(description="Average Remote Get Round-Trip Time duration (in microseconds)", displayName="Average Remote Get RTT") public double getAvgRemoteGetRtt()
    • getAvgRollbackRtt

      @ManagedAttribute(description="Average Rollback Round-Trip Time duration (in microseconds)", displayName="Average Rollback RTT") public double getAvgRollbackRtt()
    • getAvgCompleteNotificationAsync

      @ManagedAttribute(description="Average asynchronous Complete Notification duration (in microseconds)", displayName="Average Complete Notification Async") public double getAvgCompleteNotificationAsync()
    • getAvgNumNodesCommit

      @ManagedAttribute(description="Average number of nodes in Commit destination set", displayName="Average Number of Nodes in Commit Destination Set") public double getAvgNumNodesCommit()
    • getAvgNumNodesCompleteNotification

      @ManagedAttribute(description="Average number of nodes in Complete Notification destination set", displayName="Average Number of Nodes in Complete Notification Destination Set") public double getAvgNumNodesCompleteNotification()
    • getAvgNumNodesRemoteGet

      @ManagedAttribute(description="Average number of nodes in Remote Get destination set", displayName="Average Number of Nodes in Remote Get Destination Set") public double getAvgNumNodesRemoteGet()
    • getAvgNumNodesPrepare

      @ManagedAttribute(description="Average number of nodes in Prepare destination set", displayName="Average Number of Nodes in Prepare Destination Set") public double getAvgNumNodesPrepare()
    • getAvgNumNodesRollback

      @ManagedAttribute(description="Average number of nodes in Rollback destination set", displayName="Average Number of Nodes in Rollback Destination Set") public double getAvgNumNodesRollback()
    • getLocalExecutionTimeWithoutLock

      @ManagedAttribute(description="Local execution time of a transaction without the time waiting for lock acquisition", displayName="Local Execution Time Without Locking Time") public double getLocalExecutionTimeWithoutLock()
    • getAvgLockHoldTime

      @ManagedAttribute(description="Average lock holding time (in microseconds)", displayName="Average Lock Holding Time") public double getAvgLockHoldTime()
    • getAvgLocalLockHoldTime

      @ManagedAttribute(description="Average lock local holding time (in microseconds)", displayName="Average Lock Local Holding Time") public double getAvgLocalLockHoldTime()
    • getAvgRemoteLockHoldTime

      @ManagedAttribute(description="Average lock remote holding time (in microseconds)", displayName="Average Lock Remote Holding Time") public double getAvgRemoteLockHoldTime()
    • getAvgCommitTime

      @ManagedAttribute(description="Average local commit duration time (2nd phase only) (in microseconds)", displayName="Average Commit Time") public double getAvgCommitTime()
    • getAvgRollbackTime

      @ManagedAttribute(description="Average local rollback duration time (2nd phase only) (in microseconds)", displayName="Average Rollback Time") public double getAvgRollbackTime()
    • getAvgPrepareCommandSize

      @ManagedAttribute(description="Average prepare command size (in bytes)", displayName="Average Prepare Command Size") public double getAvgPrepareCommandSize()
    • getAvgCommitCommandSize

      @ManagedAttribute(description="Average commit command size (in bytes)", displayName="Average Commit Command Size") public double getAvgCommitCommandSize()
    • getAvgClusteredGetCommandSize

      @ManagedAttribute(description="Average clustered get command size (in bytes)", displayName="Average Clustered Get Command Size") public double getAvgClusteredGetCommandSize()
    • getAvgLockWaitingTime

      @ManagedAttribute(description="Average time waiting for the lock acquisition (in microseconds)", displayName="Average Lock Waiting Time") public double getAvgLockWaitingTime()
    • getAvgTxArrivalRate

      @ManagedAttribute(description="Average transaction arrival rate, originated locally and remotely (in transaction per second)", displayName="Average Transaction Arrival Rate") public double getAvgTxArrivalRate()
    • getPercentageWriteTransactions

      @ManagedAttribute(description="Percentage of Write transaction executed locally (committed and aborted)", displayName="Percentage of Write Transactions") public double getPercentageWriteTransactions()
    • getPercentageSuccessWriteTransactions

      @ManagedAttribute(description="Percentage of Write transaction executed in all successfully executed transactions (local transaction only)", displayName="Percentage of Successfully Write Transactions") public double getPercentageSuccessWriteTransactions()
    • getNumAbortedTxDueTimeout

      @ManagedAttribute(description="The number of aborted transactions due to timeout in lock acquisition", displayName="Number of Aborted Transaction due to Lock Acquisition Timeout") public double getNumAbortedTxDueTimeout()
    • getNumAbortedTxDueDeadlock

      @ManagedAttribute(description="The number of aborted transactions due to deadlock", displayName="Number of Aborted Transaction due to Deadlock") public double getNumAbortedTxDueDeadlock()
    • getAvgReadOnlyTxDuration

      @ManagedAttribute(description="Average successful read-only transaction duration (in microseconds)", displayName="Average Read-Only Transaction Duration") public double getAvgReadOnlyTxDuration()
    • getAvgWriteTxDuration

      @ManagedAttribute(description="Average successful write transaction duration (in microseconds)", displayName="Average Write Transaction Duration") public double getAvgWriteTxDuration()
    • getAvgAbortedWriteTxDuration

      @ManagedAttribute(description="Average aborted write transaction duration (in microseconds)", displayName="Average Aborted Write Transaction Duration") public double getAvgAbortedWriteTxDuration()
    • getAvgNumOfLockLocalTx

      @ManagedAttribute(description="Average number of locks per write local transaction", displayName="Average Number of Lock per Local Transaction") public double getAvgNumOfLockLocalTx()
    • getAvgNumOfLockRemoteTx

      @ManagedAttribute(description="Average number of locks per write remote transaction", displayName="Average Number of Lock per Remote Transaction") public double getAvgNumOfLockRemoteTx()
    • getAvgNumOfLockSuccessLocalTx

      @ManagedAttribute(description="Average number of locks per successfully write local transaction", displayName="Average Number of Lock per Successfully Local Transaction") public double getAvgNumOfLockSuccessLocalTx()
    • getAvgLocalPrepareTime

      @ManagedAttribute(description="Average time it takes to execute the prepare command locally (in microseconds)", displayName="Average Local Prepare Execution Time") public double getAvgLocalPrepareTime()
    • getAvgRemotePrepareTime

      @ManagedAttribute(description="Average time it takes to execute the prepare command remotely (in microseconds)", displayName="Average Remote Prepare Execution Time") public double getAvgRemotePrepareTime()
    • getAvgLocalCommitTime

      @ManagedAttribute(description="Average time it takes to execute the commit command locally (in microseconds)", displayName="Average Local Commit Execution Time") public double getAvgLocalCommitTime()
    • getAvgRemoteCommitTime

      @ManagedAttribute(description="Average time it takes to execute the commit command remotely (in microseconds)", displayName="Average Remote Commit Execution Time") public double getAvgRemoteCommitTime()
    • getAvgLocalRollbackTime

      @ManagedAttribute(description="Average time it takes to execute the rollback command locally (in microseconds)", displayName="Average Local Rollback Execution Time") public double getAvgLocalRollbackTime()
    • getAvgRemoteRollbackTime

      @ManagedAttribute(description="Average time it takes to execute the rollback command remotely (in microseconds)", displayName="Average Remote Rollback Execution Time") public double getAvgRemoteRollbackTime()
    • getAbortRate

      @ManagedAttribute(description="Abort Rate", displayName="Abort Rate") public double getAbortRate()
    • getThroughput

      @ManagedAttribute(description="Throughput (in transactions per second)", displayName="Throughput") public double getThroughput()
    • getAvgGetsPerROTransaction

      @ManagedAttribute(description="Average number of get operations per (local) read-only transaction", displayName="Average number of get operations per (local) read-only transaction") public double getAvgGetsPerROTransaction()
    • getAvgGetsPerWrTransaction

      @ManagedAttribute(description="Average number of get operations per (local) read-write transaction", displayName="Average number of get operations per (local) read-write transaction") public double getAvgGetsPerWrTransaction()
    • getAvgRemoteGetsPerWrTransaction

      @ManagedAttribute(description="Average number of remote get operations per (local) read-write transaction", displayName="Average number of remote get operations per (local) read-write transaction") public double getAvgRemoteGetsPerWrTransaction()
    • getAvgRemoteGetsPerROTransaction

      @ManagedAttribute(description="Average number of remote get operations per (local) read-only transaction", displayName="Average number of remote get operations per (local) read-only transaction") public double getAvgRemoteGetsPerROTransaction()
    • getRemoteGetExecutionTime

      @ManagedAttribute(description="Average cost of a remote get", displayName="Remote get cost") public double getRemoteGetExecutionTime()
    • getAvgPutsPerWrTransaction

      @ManagedAttribute(description="Average number of put operations per (local) read-write transaction", displayName="Average number of put operations per (local) read-write transaction") public double getAvgPutsPerWrTransaction()
    • getAvgRemotePutsPerWrTransaction

      @ManagedAttribute(description="Average number of remote put operations per (local) read-write transaction", displayName="Average number of remote put operations per (local) read-write transaction") public double getAvgRemotePutsPerWrTransaction()
    • getRemotePutExecutionTime

      @ManagedAttribute(description="Average cost of a remote put", displayName="Remote put cost") public double getRemotePutExecutionTime()
    • getNumberOfGets

      @ManagedAttribute(description="Number of gets performed since last reset", displayName="Number of Gets") public double getNumberOfGets()
    • getNumberOfRemoteGets

      @ManagedAttribute(description="Number of remote gets performed since last reset", displayName="Number of Remote Gets") public double getNumberOfRemoteGets()
    • getNumberOfPuts

      @ManagedAttribute(description="Number of puts performed since last reset", displayName="Number of Puts") public double getNumberOfPuts()
    • getNumberOfRemotePuts

      @ManagedAttribute(description="Number of remote puts performed since last reset", displayName="Number of Remote Puts") public double getNumberOfRemotePuts()
    • getNumberOfCommits

      @ManagedAttribute(description="Number of committed transactions since last reset", displayName="Number Of Commits") public double getNumberOfCommits()
    • getNumberOfLocalCommits

      @ManagedAttribute(description="Number of local committed transactions since last reset", displayName="Number Of Local Commits") public double getNumberOfLocalCommits()
    • getWriteSkewProbability

      @ManagedAttribute(description="Write skew probability", displayName="Write Skew Probability") public double getWriteSkewProbability()
    • getPercentileLocalReadOnlyTransaction

      @ManagedOperation(description="K-th percentile of local read-only transactions execution time", displayName="K-th Percentile Local Read-Only Transactions") public double getPercentileLocalReadOnlyTransaction(@Parameter(name="percentile") int percentile)
    • getPercentileRemoteReadOnlyTransaction

      @ManagedOperation(description="K-th percentile of remote read-only transactions execution time", displayName="K-th Percentile Remote Read-Only Transactions") public double getPercentileRemoteReadOnlyTransaction(@Parameter(name="percentile") int percentile)
    • getPercentileLocalRWriteTransaction

      @ManagedOperation(description="K-th percentile of local write transactions execution time", displayName="K-th Percentile Local Write Transactions") public double getPercentileLocalRWriteTransaction(@Parameter(name="percentile") int percentile)
    • getPercentileRemoteWriteTransaction

      @ManagedOperation(description="K-th percentile of remote write transactions execution time", displayName="K-th Percentile Remote Write Transactions") public double getPercentileRemoteWriteTransaction(@Parameter(name="percentile") int percentile)
    • resetStatistics

      @ManagedOperation(description="Reset all the statistics collected", displayName="Reset All Statistics") public void resetStatistics()
    • getAvgLocalGetTime

      @ManagedAttribute(description="Average Local processing Get time (in microseconds)", displayName="Average Local Get time") public double getAvgLocalGetTime()
    • getNumNodes

      @ManagedAttribute(description="Number of nodes in the cluster", displayName="Number of nodes") public double getNumNodes()
    • getReplicationDegree

      @ManagedAttribute(description="Number of replicas for each key", displayName="Replication Degree") public double getReplicationDegree()
    • getLocalActiveTransactions

      @ManagedAttribute(description="Number of concurrent transactions executing on the current node", displayName="Local Active Transactions") public double getLocalActiveTransactions()
    • getAvgResponseTime

      @ManagedAttribute(description="Average Response Time", displayName="Average Response Time") public double getAvgResponseTime()
    • getStatisticValue

      @ManagedOperation(description="Returns the raw value for the statistic", displayName="Get Statistic Value") public final double getStatisticValue(@Parameter(description="Statistic name") String statName)
    • getAvailableExtendedStatistics

      @ManagedAttribute(description="Returns all the available statistics", displayName="Available Statistics") public final String getAvailableExtendedStatistics()
    • dumpStatistics

      @ManagedOperation(description="Dumps the current cache statistic values", displayName="Dump Cache Statistics") public final String dumpStatistics()
    • dumpStatisticsToSystemOut

      @ManagedOperation(description="Dumps the current cache statistic values to System.out", displayName="Dump Cache Statistics to System.out") public final void dumpStatisticsToSystemOut()
    • dumpStatisticToFile

      @ManagedOperation(description="Dumps the current cache statistic values to a file", displayName="Dump cache Statistics to file") public final void dumpStatisticToFile(@Parameter(description="The file path") String filePath) throws IOException
      Throws:
      IOException
    • getCacheStatisticManager

      public final CacheStatisticManager getCacheStatisticManager()
    • getAttribute

      public double getAttribute(ExtendedStatistic statistic)
    • start

      protected void start()
      Overrides:
      start in class BaseCustomAsyncInterceptor