From 2a1ed0b45513425a25b0b7f6a6f768a9ecc55e0e Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sat, 21 Dec 2024 11:25:20 -0500 Subject: [PATCH] throttle: track time values more closely Decaying averages by 10% every 5 minutes gives roughly a half-hour half-life to the rolling average. Speed that up to once per minute. Signed-off-by: Zygo Blaxell --- src/bees.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bees.cc b/src/bees.cc index 6c34584..b27d102 100644 --- a/src/bees.cc +++ b/src/bees.cc @@ -326,7 +326,7 @@ bees_throttle(const double time_used, const char *const context) ++this_time_count; // Keep the timing data fresh static Timer s_fresh_timer; - if (s_fresh_timer.age() > 300) { + if (s_fresh_timer.age() > 60) { s_fresh_timer.reset(); this_time_count *= 0.9; this_time_used *= 0.9;