getRecentPerformanceSamples
Explore getRecentPerformanceSamples: Use Cases, Code Examples, Parameters, Response Format, and Pro Tips
The getRecentPerformanceSamples RPC method delivers a time‑series snapshot of Solana’s network performance, sampling roughly every 60 seconds. Each sample records the number of transactions processed and slots produced during that interval—critical metrics for assessing throughput and network health.
Key Use Cases
Network Health Monitoring Track transaction rates and slot production over time to detect congestion or slowdowns.
Performance Analysis Examine historical samples to identify trends, peak load periods, and capacity limits.
Dashboarding & Alerts Display TPS (transactions per second) and slots‑per‑minute on monitoring dashboards or trigger alerts when performance dips.
Capacity Planning Use sampled data to forecast resource needs for application scaling and infrastructure provisioning.
Request Parameters
limit(optional, usize): Number of most recent samples to return (max 720, ~12 hours of data). Omittinglimitreturns the provider’s default sample count.
Response Structure
An array of performance sample objects in reverse chronological order:
slot
u64
Slot at which this sample was recorded
numTransactions
u64
Total transactions (including votes) in the period
numSlots
u64
Slots produced during the sample interval
samplePeriodSecs
u16
Actual duration of the sample (usually ~60 seconds)
numNonVoteTransactions
u64
Transactions excluding consensus votes
Get the Last 5 Performance Samples
Get Default Number of Performance Samples
Code Examples
Example Response
Developer Tips
Interval Variance: Samples aim for ~60‑second intervals; check
samplePeriodSecsto see the exact duration.Data Retention: Up to 720 samples (~12 hours). For longer-term analysis, combine with external logging.
Vote vs. User Activity: Use
numNonVoteTransactionsto focus on user‑driven load apart from voting traffic.Node Differences: Slight variations may occur between RPC nodes based on synchronization and local timing.
Last updated