kozyilmaz/nheqminer-macos

[Bug] The average hash rate is "too" average in failing cases

Blackskyliner opened this issue · 1 comments

Problem
If the hash rate of the miner, for what ever reason, drops it is not correctly displayed on the log ouput.

Observerd
Logs where the problem is somehow related to can be viewed in #22

Possible solving

  • I would guess, w/o looking at the code, that the hash rate gets averaged over multiple or even all turns, so we can display a more realistiv average number to the user without too much fluctuation.
  • I would also assume that we have some global variable to which we relate to after calculating the last hash rate and sum that into our averaging.
  • Based on that assumptions a fix would be that the log only averages over the last 10 to 20 measurements instead of all and not sum it into a global value but use something like a ring buffer and always add all entries within up and divide them by the size of the ring buffer.
  • If none of the assumption applies ignore that solving section 😄

Mitigate
Restart the Miner and the rate does correctly show up.

Ohh.. I see it is already a buffer which should theoretically get purged after the interval (15 sec per default) Related code in https://github.com/kozyilmaz/nheqminer/blob/master/nheqminer/speed.cpp#L33 - And so I just saw that this issue is in the wrong repository then and relates more to that repository: kozyilmaz/nheqminer@1056a9a and even though you forked the main repo and adapted the code to compile/run under macos I should better ask in the main repository I guess?

Sorry for that issue 😞 I guess I should open my editor/shell earlier to see all those information before posting an issue in the wrong repository. You may repopen that issue if you may want to tackle that problem.