getRecentPerformanceSamples RPC Method

Returns a list of recent performance samples, in reverse slot order.

Performance Sample Details

Performance samples are taken every 60 seconds and include the number of transactions and slots that occur in a given time window.

Parameters

limit usize optional
Number of samples to return

  • Maximum of 720 samples

Voting Transactions Calculation

To calculate the number of voting transactions:

  • numVotingTransactions = numTransactions - numNonVoteTransactions

Code Sample

curl https://rpc.testnet.soo.network/rpc \
-X POST \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getRecentPerformanceSamples",
  "params": [10]
}'

Response

{
  "jsonrpc": "2.0",
  "result": [
    {
      "slot": 369624,
      "numTransactions": 1000,
      "numSlots": 50,
      "samplePeriodSecs": 60,
      "numNonVoteTransactions": 800
    }
  ],
  "id": 1
}

Result Details

An array of performance sample objects, each containing:

  • slot: <u64>

    • Slot in which the sample was taken
    • Identifies the specific blockchain slot for the performance measurement
  • numTransactions: <u64>

    • Total number of transactions processed during the sample period
    • Includes both voting and non-voting transactions
  • numSlots: <u64>

    • Number of slots completed during the sample period
    • Indicates the blockchain’s processing activity
  • samplePeriodSecs: <u16>

    • Duration of the sample window in seconds
    • Typically 60 seconds per sample
  • numNonVoteTransactions: <u64>

    • Number of non-vote transactions processed
    • Available starting with v1.15

Important Notes

  • Samples are returned in reverse slot order
  • Maximum of 720 samples can be retrieved
  • Samples are taken every 60 seconds