Parameters
number
Number of samples to return (default: 720)
Response
array
Code Examples
Basic Request
Request with Limit
Using web3.js
Notes
- Returns recent performance samples from the network
- Each sample covers a period of time (typically 60 seconds)
- Samples include transaction counts and slot information
- The response is immediate as it reads from the current state
- The default limit is 720 samples (approximately 12 hours)
Best Practices
- Use appropriate limit based on your analysis needs
- Cache results when appropriate to reduce RPC load
- Monitor for significant changes in performance
- Consider using websocket subscription for real-time updates
- Handle network errors and retry when appropriate
Common Errors
Use Cases
-
Performance Analysis
-
Performance Monitoring
-
Performance History