mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-09 00:33:33 -05:00
More precise hashrate calculation
- Use only steady timestamp counters to guarantee correctness - CPU backend: directly measure total hashrate using raw hash counters from each thread; update data more often on ARM CPUs because they're slower - GPU backends: directly measure total hashrate too, but use interpolator with 4 second lag to fix variance from batches of hashes Total hashrate is now measured directly (realtime for CPU, 4 seconds lag for GPU), so it might differ a bit from the sum of all thread hashrates because data points are taken at different moments in time. Overhead is reduced a lot since it doesn't have to go through all threads to calculate max total hashrate on every timer tick (2 times a second).
This commit is contained in:
@@ -203,7 +203,7 @@ public:
|
||||
continue;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < hr->threads(); i++) {
|
||||
for (size_t i = 1; i < hr->threads(); i++) {
|
||||
Value thread(kArrayType);
|
||||
thread.PushBack(Hashrate::normalize(hr->calc(i, Hashrate::ShortInterval)), allocator);
|
||||
thread.PushBack(Hashrate::normalize(hr->calc(i, Hashrate::MediumInterval)), allocator);
|
||||
|
||||
Reference in New Issue
Block a user