getRecentPerformanceSamples

The getRecentPerformanceSamples method returns a list of recent performance samples from the node. These samples provide insights into network throughput, transaction processing rates, and overall blockchain performance over recent time periods.

Solana tracks performance metrics in periodic samples that record transactions processed, slots completed, and time elapsed. These samples are invaluable for monitoring network health, analyzing throughput trends, identifying performance degradation, and understanding how the network is handling load. Each sample represents aggregated performance data over a period of approximately 60 seconds, providing a rolling view of network performance.

This method is essential for monitoring dashboards, performance analysis tools, and applications that need to adapt their behavior based on network conditions. It helps developers and operators understand if the network is operating at full capacity, experiencing congestion, or running smoothly. The data can inform decisions about transaction timing, fee strategies, and user experience optimizations.


Parameters

parameter
type
description
limit
number
Optional. Number of samples to return (maximum 720, default: 720)
Return Object
field
type
description
result
array
Array of performance sample objects, most recent first
result[].slot
number
Slot number at which the sample was taken
result[].numTransactions
number
Number of transactions processed in the sample period
result[].numSlots
number
Number of slots completed in the sample period
result[].samplePeriodSecs
number
Number of seconds in the sample period (typically 60)
result[].numNonVoteTransactions
number
Number of non-vote transactions in the sample period
Request Example
Request
Response Example
Response

Tip: Calculate TPS as numTransactions / samplePeriodSecs. Non-vote transactions are user transactions (votes are consensus-related). The difference shows validator voting overhead. Samples span approximately 720 minutes (12 hours) at maximum. Monitor trends to detect performance issues or congestion.


Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?