1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-02-01 09:43:03 -05:00

Added benchmark and stress test

Easy to use and zero configuration embedded benchmark/stress test.
This commit is contained in:
SChernykh
2020-10-14 19:45:05 +02:00
parent 9fcc542676
commit 2ecece7b3d
28 changed files with 354 additions and 55 deletions

View File

@@ -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();
}
}