Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
More sophisticated rate policies can be implemented as user-defined types which meet the requirements of __RatePolicy__. Here, we develop a rate policy that measures the instantaneous throughput of reads and writes. First we write a small utility class that applies an exponential smoothing function to a series of discrete rate samples, to calculate instantaneous throughput.更复杂的速率策略可以作为用户自定义类型来实现,只需满足 __RatePolicy__ 概念的要求即可。下面我们开发一个速率策略,用于测量读写操作的瞬时吞吐量。首先编写一个辅助类,该类对一系列离散的速率采样值应用指数平滑函数,以计算瞬时吞吐量。