getRecentPerformanceSamples RPC 方法
返回最近性能样本的列表,按 slot 倒序排列。性能样本每 60 秒采集一次,包括在给定时间窗口内发生的交易数量和 slot 数量。
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getRecentPerformanceSamples",> "params": [> 2> ]> }> '
params
usizeoptional
要返回的样本数量(最大值为 720)
result
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}
array
一个包含性能样本对象的数组,其中包括:
Is this page helpful?