Added benchmark and stress test
Easy to use and zero configuration embedded benchmark/stress test.
This commit is contained in:
parent
9fcc542676
commit
2ecece7b3d
28 changed files with 354 additions and 55 deletions
|
@ -573,8 +573,12 @@ void xmrig::Miner::onTimer(const Timer *)
|
|||
double maxHashrate = 0.0;
|
||||
const auto healthPrintTime = d_ptr->controller->config()->healthPrintTime();
|
||||
|
||||
bool stopMiner = false;
|
||||
|
||||
for (IBackend *backend : d_ptr->backends) {
|
||||
backend->tick(d_ptr->ticks);
|
||||
if (!backend->tick(d_ptr->ticks)) {
|
||||
stopMiner = true;
|
||||
}
|
||||
|
||||
if (healthPrintTime && d_ptr->ticks && (d_ptr->ticks % (healthPrintTime * 2)) == 0 && backend->isEnabled()) {
|
||||
backend->printHealth();
|
||||
|
@ -607,6 +611,10 @@ void xmrig::Miner::onTimer(const Timer *)
|
|||
setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (stopMiner) {
|
||||
stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue