mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-08 08:23:34 -05:00
Set benchmark controller even if no benchmark run is executed
This commit is contained in:
@@ -87,9 +87,10 @@ int xmrig::App::exec()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_controller->pre_start();
|
m_controller->pre_start();
|
||||||
|
m_controller->config()->benchmark().set_controller(m_controller);
|
||||||
|
|
||||||
if (m_controller->config()->benchmark().isNewBenchRun() || m_controller->config()->isRebenchAlgo()) {
|
if (m_controller->config()->benchmark().isNewBenchRun() || m_controller->config()->isRebenchAlgo()) {
|
||||||
m_controller->config()->benchmark().start(m_controller);
|
m_controller->config()->benchmark().start();
|
||||||
} else {
|
} else {
|
||||||
m_controller->start();
|
m_controller->start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,8 +30,7 @@
|
|||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
|
|
||||||
// start performance measurements from the first bench_algo
|
// start performance measurements from the first bench_algo
|
||||||
void Benchmark::start(Controller* controller) {
|
void Benchmark::start() {
|
||||||
m_controller = controller;
|
|
||||||
JobResults::setListener(this); // register benchmark as job result listener to compute hashrates there
|
JobResults::setListener(this); // register benchmark as job result listener to compute hashrates there
|
||||||
// write text before first benchmark round
|
// write text before first benchmark round
|
||||||
LOG_ALERT(">>>>> STARTING ALGO PERFORMANCE CALIBRATION (with %i seconds round)", m_controller->config()->benchAlgoTime());
|
LOG_ALERT(">>>>> STARTING ALGO PERFORMANCE CALIBRATION (with %i seconds round)", m_controller->config()->benchAlgoTime());
|
||||||
|
|||||||
@@ -67,9 +67,10 @@ class Benchmark : public IJobResultListener {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Benchmark() : m_controller(nullptr), m_isNewBenchRun(true) {}
|
Benchmark() : m_controller(nullptr), m_isNewBenchRun(true) {}
|
||||||
|
void set_controller(Controller* controller) { m_controller = controller; }
|
||||||
virtual ~Benchmark() {}
|
virtual ~Benchmark() {}
|
||||||
|
|
||||||
void start(Controller* controller); // start benchmarks
|
void start(); // start benchmarks
|
||||||
|
|
||||||
bool isNewBenchRun() const { return m_isNewBenchRun; }
|
bool isNewBenchRun() const { return m_isNewBenchRun; }
|
||||||
float algo_perf[Algorithm::MAX];
|
float algo_perf[Algorithm::MAX];
|
||||||
|
|||||||
Reference in New Issue
Block a user