1
0
Mirror von https://github.com/tkuschel/bees.git synchronisiert 2026-06-19 15:07:54 +02:00

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 <bees@furryterror.org>
Dieser Commit ist enthalten in:
Zygo Blaxell
2024-12-21 11:25:20 -05:00
Ursprung d160edc15a
Commit 2a1ed0b455
+1 -1
Datei anzeigen
@@ -326,7 +326,7 @@ bees_throttle(const double time_used, const char *const context)
++this_time_count; ++this_time_count;
// Keep the timing data fresh // Keep the timing data fresh
static Timer s_fresh_timer; static Timer s_fresh_timer;
if (s_fresh_timer.age() > 300) { if (s_fresh_timer.age() > 60) {
s_fresh_timer.reset(); s_fresh_timer.reset();
this_time_count *= 0.9; this_time_count *= 0.9;
this_time_used *= 0.9; this_time_used *= 0.9;