Added CMake option WITH_BENCHMARK.

This commit is contained in:
XMRig 2020-10-16 02:18:07 +07:00
parent ccebf6bb20
commit a152d6be42
No known key found for this signature in database
GPG key ID: 446A53638BE94409
19 changed files with 245 additions and 121 deletions

View file

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