Added CMake option WITH_BENCHMARK.
This commit is contained in:
parent
ccebf6bb20
commit
a152d6be42
19 changed files with 245 additions and 121 deletions
|
@ -24,6 +24,8 @@
|
|||
|
||||
|
||||
#include "base/kernel/interfaces/IConfig.h"
|
||||
#include "base/net/stratum/Pool.h"
|
||||
#include "base/net/stratum/Pools.h"
|
||||
#include "core/config/ConfigTransform.h"
|
||||
#include "crypto/cn/CnHash.h"
|
||||
|
||||
|
@ -243,6 +245,19 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
|
|||
return set(doc, "health-print-time", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
case IConfig::StressKey: /* --stress */
|
||||
case IConfig::BenchKey: /* --bench */
|
||||
set(doc, kCpu, "huge-pages-jit", true);
|
||||
set(doc, kCpu, "priority", 2);
|
||||
set(doc, kCpu, "yield", false);
|
||||
|
||||
if (key == IConfig::BenchKey) {
|
||||
add(doc, Pools::kPools, Pool::kBenchmark, arg);
|
||||
}
|
||||
break;
|
||||
# endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -96,8 +96,11 @@ static const option options[] = {
|
|||
{ "title", 1, nullptr, IConfig::TitleKey },
|
||||
{ "no-title", 0, nullptr, IConfig::NoTitleKey },
|
||||
{ "pause-on-battery", 0, nullptr, IConfig::PauseOnBatteryKey },
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
{ "stress", 0, nullptr, IConfig::StressKey },
|
||||
{ "bench", 1, nullptr, IConfig::BenchKey },
|
||||
{ "benchmark", 1, nullptr, IConfig::BenchKey },
|
||||
# endif
|
||||
# ifdef XMRIG_FEATURE_TLS
|
||||
{ "tls", 0, nullptr, IConfig::TlsKey },
|
||||
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },
|
||||
|
|
|
@ -178,8 +178,11 @@ 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";
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
u += " --stress run continuous stress test to check system stability\n";
|
||||
u += " --bench=N run benchmark in offline mode, N can be between 1M and 10M\n";
|
||||
# endif
|
||||
|
||||
return u;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue