Commit 87ac3a006ffd15d0eac29e294ab4bad64bfa8557

Con Kolivas 2011-08-30T12:40:48

Provide much more smoothing of the short term rates.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/main.c b/main.c
index efed5b9..4d01a49 100644
--- a/main.c
+++ b/main.c
@@ -1358,7 +1358,7 @@ static inline int dev_from_id(int thr_id)
 /* Simulate a rolling average by faking an exponential decay over 5 * log */
 static inline void decay_time(double *f, double fadd)
 {
-	*f = (fadd + *f * 0.9) / 1.9;
+	*f = (fadd * .37 + *f) / 1.37;
 }
 
 static int requests_staged(void)