Added --calibrate-algo-time command line switch support
This commit is contained in:
parent
30a4f53c8f
commit
0bc9d775c6
7 changed files with 17 additions and 5 deletions
|
@ -66,7 +66,7 @@ void Benchmark::onJobResult(const JobResult& result) {
|
|||
++ m_hash_count;
|
||||
const uint64_t now = get_now();
|
||||
if (!m_time_start) m_time_start = now; // time of measurements start (in ms)
|
||||
else if (now - m_time_start > m_bench_secs*1000) { // end of becnhmark round for m_pa
|
||||
else if (now - m_time_start > static_cast<unsigned>(m_controller->config()->calibrateAlgoTime())*1000) { // end of becnhmark round for m_pa
|
||||
const float hashrate = static_cast<float>(m_hash_count) * result.diff / (now - m_time_start) * 1000.0f;
|
||||
m_controller->config()->set_algo_perf(m_pa, hashrate); // store hashrate result
|
||||
Log::i()->text(m_controller->config()->isColors()
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "core/Controller.h"
|
||||
|
||||
class Benchmark : public IJobResultListener {
|
||||
const uint64_t m_bench_secs = 5; // time in seconds to benchmark each perf algo
|
||||
xmrig::PerfAlgo m_pa; // current perf algo we benchmark
|
||||
uint64_t m_hash_count; // number of hashes calculated for current perf algo
|
||||
uint64_t m_time_start; // time of measurements start for current perf algo (in ms)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue