Skip to main content

getRecentPerformanceSamples

Returns a list of recent performance samples, in reverse slot order. Performance samples are taken every 60 seconds and include the number of transactions and slots that occur in a given time window.

Common use cases
Monitor network throughput (TPS calculation)Fetch recent samples and compute numTransactions / samplePeriodSecs to measure current network capacity and health. Essential for dashboards, alerts, and capacity planning.
Analyze historical network performanceRetrieve multiple samples (up to 720) to calculate rolling averages, detect performance degradation patterns, or measure network behavior during specific events (e.g., NFT mints, protocol upgrades).
Calculate average slot timeUse samplePeriodSecs / numSlots to determine slot production rate (typically 400-450ms). Critical for validator performance analysis and confirming network timing assumptions.

Parameters

number of samples (usize, optional)

Number of samples to return (maximum 720)

Request

curl https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getRecentPerformanceSamples",
"params": [
2
]
}'
Network Selection

Replace mainnet with devnet in the URL to query devnet instead.

Response

{
"jsonrpc": "2.0",
"result": [
{
"slot": 348125,
"numTransactions": 126,
"numSlots": 126,
"samplePeriodSecs": 60,
"numNonVoteTransactions": 1
},
{
"slot": 347999,
"numTransactions": 126,
"numSlots": 126,
"samplePeriodSecs": 60,
"numNonVoteTransactions": 1
}
],
"id": 1
}

Response Fields

Return value: array

An array of performance sample objects containing:

FAQ and Troubleshooting

How do I calculate the current TPS of the Solana network?

Fetch a recent sample with limit: 1, then compute TPS = numTransactions / samplePeriodSecs. For example, if numTransactions = 263299 and samplePeriodSecs = 60, then TPS = 4388.3.

What is the samplePeriodSecs value, and does it change?

It is always 60 seconds. Each sample represents a fixed 60-second window of network activity.

Why is numNonVoteTransactions sometimes missing?

The numNonVoteTransactions field is optional and may be absent in older samples. Always check for its presence before using it in calculations.

How can I analyze performance over a specific time range?

Fetch up to 720 samples (12 hours of history), filter by slot range, and aggregate numTransactions and numSlots to compute metrics over your desired timeframe.

getSlot
Retrieve the current slot to correlate performance samples with real-time network state. Often used together to validate that samples are recent.

getEpochInfo
Fetch epoch details to contextualize performance data within epoch boundaries. Useful for analyzing performance trends across epochs.

getRecentPrioritizationFees
While getRecentPerformanceSamples measures network throughput, this method reveals fee market dynamics. Together, they provide comprehensive network health insights.

getVersion
Confirm the validator software version to correlate performance characteristics with specific releases.

External Resources