pub trait QPS {
// Required methods
fn qps(&self, total: u64);
fn time(&self, total: u64);
fn cost(&self);
}
Expand description
定义一个 QPS
trait,用于计算每秒查询数(QPS)、操作耗时以及总耗时。
Required Methods§
Implementations on Foreign Types§
Source§impl QPS for Instant
为 std::time::Instant
实现 QPS
trait。
impl QPS for Instant
为 std::time::Instant
实现 QPS
trait。