Cli: better estimate of epoch time elapsed/remaining (#15893)
* Add rpc_client api for getRecentPerformanceSamples * Prep fn for variable avg slot time * Use recent-perf-samples to more-accurately estimate epoch completed times * Spell out average
This commit is contained in:
@@ -644,6 +644,13 @@ impl RpcClient {
|
||||
self.send(RpcRequest::GetEpochSchedule, Value::Null)
|
||||
}
|
||||
|
||||
pub fn get_recent_performance_samples(
|
||||
&self,
|
||||
limit: Option<usize>,
|
||||
) -> ClientResult<Vec<RpcPerfSample>> {
|
||||
self.send(RpcRequest::GetRecentPerformanceSamples, json!([limit]))
|
||||
}
|
||||
|
||||
pub fn get_identity(&self) -> ClientResult<Pubkey> {
|
||||
let rpc_identity: RpcIdentity = self.send(RpcRequest::GetIdentity, Value::Null)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user