修改了pid参数,跑了一些数据
This commit is contained in:
@@ -23,6 +23,7 @@ class PerformanceReporter:
|
||||
pid,
|
||||
*,
|
||||
window_s,
|
||||
sample_period_s,
|
||||
band_pct,
|
||||
std_pct,
|
||||
flow_range_min_slm,
|
||||
@@ -32,6 +33,7 @@ class PerformanceReporter:
|
||||
):
|
||||
self.pid = pid
|
||||
self.window_s = float(window_s)
|
||||
self.sample_period_s = float(sample_period_s)
|
||||
self.band_pct = float(band_pct)
|
||||
self.std_pct = float(std_pct)
|
||||
self.flow_range_min_slm = float(flow_range_min_slm)
|
||||
@@ -85,7 +87,11 @@ class PerformanceReporter:
|
||||
|
||||
if len(self._window) < 2:
|
||||
return
|
||||
if self._window[-1][0] - self._window[0][0] < self.window_s:
|
||||
# 采样时间戳会有轻微抖动。旧样本按 window_s 剔除后,窗口跨度通常会
|
||||
# 比 window_s 少一个采样周期;若仍严格要求完整 window_s,判稳可能
|
||||
# 只能依赖浮点时间戳碰巧相等。允许一个采样周期的覆盖余量。
|
||||
min_span = max(0.0, self.window_s - self.sample_period_s)
|
||||
if self._window[-1][0] - self._window[0][0] < min_span:
|
||||
return
|
||||
|
||||
flows = [item[1] for item in self._window]
|
||||
|
||||
Reference in New Issue
Block a user