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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -96,6 +96,8 @@ static const option options[] = {
|
|||
{ "title", 1, nullptr, IConfig::TitleKey },
|
||||
{ "no-title", 0, nullptr, IConfig::NoTitleKey },
|
||||
{ "pause-on-battery", 0, nullptr, IConfig::PauseOnBatteryKey },
|
||||
{ "stress", 0, nullptr, IConfig::StressKey },
|
||||
{ "bench", 1, nullptr, IConfig::BenchKey },
|
||||
# ifdef XMRIG_FEATURE_TLS
|
||||
{ "tls", 0, nullptr, IConfig::TlsKey },
|
||||
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },
|
||||
|
|
|
@ -178,6 +178,8 @@ static inline const std::string &usage()
|
|||
u += " --no-title disable setting console window title\n";
|
||||
# endif
|
||||
u += " --pause-on-battery pause mine on battery power\n";
|
||||
u += " --stress run continuous stress test to check system stability\n";
|
||||
u += " --bench=N run benchmark in offline mode, N can be 1M or 10M\n";
|
||||
|
||||
return u;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue