Learn getRecentPerformanceSamples use cases, code examples, request parameters, response structure, and tips.
getRecentPerformanceSamples
RPC method provides a snapshot of the Solana network’s recent performance. It returns a list of samples, taken approximately every 60 seconds, detailing the number of transactions and slots processed within those periods. This data is invaluable for monitoring network throughput and health. For more context on Solana’s performance metrics like TPS and slot times, you can read the Solana for Enterprise guide.
limit
(usize
, optional):
720
(representing approximately 12 hours of data, as samples are taken every 60 seconds).result
field of the JSON-RPC response is an array of performance sample objects, returned in reverse chronological order (most recent sample first). Each object has the following structure:
slot
(u64
): The slot number in which this performance sample was recorded.numTransactions
(u64
): The total number of transactions (including vote and non-vote transactions) processed during the samplePeriodSecs
leading up to this slot
.numSlots
(u64
): The number of slots that were processed during the samplePeriodSecs
leading up to this slot
.samplePeriodSecs
(u16
): The duration, in seconds, over which this sample was taken (typically 60
).numNonVoteTransactions
(u64
): The number of transactions that were not consensus vote transactions, processed during the samplePeriodSecs
.limit
parameter, requesting the RPC node’s default number of samples.
samplePeriodSecs
field in the response indicates the actual duration for each sample.limit
of 720 samples provides a window of approximately 12 hours of historical data. For longer-term performance analysis, external data logging and aggregation are necessary.numTransactions
includes all transactions, while numNonVoteTransactions
specifically counts those that are not part of the consensus voting process. The latter is often a better indicator of user-driven network activity.getRecentPerformanceSamples
, developers and network observers can gain valuable insights into the operational status and throughput of the Solana network.