MinerLamp
MinerLamp copied to clipboard
Moving Avg
I tried to implement a moving avg. But I don't know c++ so I ran from error to error - damn oldschool basic...
Idea would be to calculate a moving avg for the Hashrate without the Need to store values:
Loop ( k++ avg_hashrate=avg_hashrate+ (new_hashrate - avg_hashrate)/k )
this would enter a state of near Equilibrium over time without the need to store values. One could have a check like ?mod(k)=20 or 50;k=0;k
or just let k constant at 20 to have some tiny but noticable changes (i like this one most)
What do u think?
Yes it could be nice to have that average... Can you explain me in details how you compute the k value ?
The goal would be to have a stable and relyable average for the hashrate, but also to be able to account for recent changes due to overclocking.
pls forget the Approach from above with the k.
The goal could be reached by a simple algo:
avg = avg * 19/20 + recent_hr*1/20
This will result in a stable Output - changes will be reflected after a few hr changes. Maybe have the "20" as a configurable var ("Avg Adaptation Factor"); the lower the faster/unstable; the higher the slower/stable
maybe like this, will probably not work due to string / double:
QString hrValue = hrValue*19/20 + hashrate.mid(0, hashrate.indexOf("MH/s"))*1/20;
The LCD Display sometimes shows ":" before the HR. Edit: ":" not shown with Ethminer 0.12dev
I'm a lazzy dude... I'll do it in the next release :)
Can we get a watchdog feature on avg. hash? For hanging GPUs etc,.. :)