Benchmark refactoring, zero delay submit and unified HTTP layer.

This commit is contained in:
XMRig 2020-11-16 16:22:34 +07:00
parent be8245fc92
commit c1d99bfa09
No known key found for this signature in database
GPG key ID: 446A53638BE94409
21 changed files with 558 additions and 380 deletions

View file

@ -56,7 +56,7 @@
#ifdef XMRIG_FEATURE_BENCHMARK
# include "backend/common/Benchmark.h"
# include "backend/common/benchmark/Benchmark.h"
#endif

View file

@ -53,6 +53,11 @@
#endif
#ifdef XMRIG_FEATURE_BENCHMARK
# include "backend/common/benchmark/BenchState.h"
#endif
namespace xmrig {
static constexpr uint32_t kReserveCount = 32768;
@ -245,8 +250,7 @@ void xmrig::CpuWorker<N>::start()
// Stop benchmark when all hashes have been counted
if (done) {
m_benchDoneTime = Chrono::steadyMSecs();
return;
return BenchState::done(m_benchData, Chrono::steadyMSecs());;
}
// Make each hash dependent on the previous one in single thread benchmark to prevent cheating with multiple threads

View file

@ -91,6 +91,10 @@ private:
# ifdef XMRIG_ALGO_RANDOMX
randomx_vm *m_vm = nullptr;
# endif
# ifdef XMRIG_FEATURE_BENCHMARK
uint64_t m_benchData = 0;
# endif
};