Added CMake option WITH_BENCHMARK.
This commit is contained in:
parent
ccebf6bb20
commit
a152d6be42
19 changed files with 245 additions and 121 deletions
|
@ -151,9 +151,9 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
|
|||
}
|
||||
break;
|
||||
|
||||
case IConfig::UrlKey: /* --url */
|
||||
case IConfig::UrlKey: /* --url */
|
||||
case IConfig::StressKey: /* --stress */
|
||||
case IConfig::BenchKey: /* --bench */
|
||||
case IConfig::BenchKey: /* --bench */
|
||||
{
|
||||
if (!doc.HasMember(Pools::kPools)) {
|
||||
doc.AddMember(rapidjson::StringRef(Pools::kPools), rapidjson::kArrayType, doc.GetAllocator());
|
||||
|
@ -164,19 +164,20 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
|
|||
array.PushBack(rapidjson::kObjectType, doc.GetAllocator());
|
||||
}
|
||||
|
||||
if (key == IConfig::UrlKey) {
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
if (key != IConfig::UrlKey) {
|
||||
set(doc, array[array.Size() - 1], Pool::kUrl, (key == IConfig::BenchKey) ? "benchmark" :
|
||||
# ifdef XMRIG_FEATURE_TLS
|
||||
"stratum+ssl://randomx.xmrig.com:443"
|
||||
# else
|
||||
"randomx.xmrig.com:3333"
|
||||
# endif
|
||||
);
|
||||
} else
|
||||
# endif
|
||||
{
|
||||
set(doc, array[array.Size() - 1], Pool::kUrl, arg);
|
||||
}
|
||||
else {
|
||||
set(doc, array[array.Size() - 1], Pool::kUrl, (key == IConfig::BenchKey) ? "offline" : "donate.v2.xmrig.com:3333");
|
||||
set(doc, "cpu", "huge-pages-jit", true);
|
||||
set(doc, "cpu", "priority", 2);
|
||||
set(doc, "cpu", "yield", false);
|
||||
if (key == IConfig::BenchKey) {
|
||||
set(doc, array[array.Size() - 1], Pool::kBenchmark, arg);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue