Merge of xmrig v6.5.0
This commit is contained in:
commit
a57d1bbbda
86 changed files with 15293 additions and 490 deletions
|
@ -341,9 +341,9 @@ public:
|
|||
Algorithm algorithm;
|
||||
Algorithms algorithms;
|
||||
bool active = false;
|
||||
bool battery_power = false;
|
||||
bool enabled = true;
|
||||
bool reset = true;
|
||||
bool battery_power = false;
|
||||
Controller *controller;
|
||||
Job job;
|
||||
mutable std::map<Algorithm::Id, double> maxHashrate;
|
||||
|
|
|
@ -36,6 +36,11 @@
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef XMRIG_FEATURE_BENCHMARK
|
||||
# include "base/net/stratum/benchmark/BenchConfig.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace xmrig
|
||||
{
|
||||
|
||||
|
@ -103,8 +108,6 @@ void xmrig::ConfigTransform::finalize(rapidjson::Document &doc)
|
|||
BaseTransform::finalize(doc);
|
||||
|
||||
if (m_threads) {
|
||||
doc.AddMember("version", 1, allocator);
|
||||
|
||||
if (!doc.HasMember(CpuConfig::kField)) {
|
||||
doc.AddMember(StringRef(CpuConfig::kField), Value(kObjectType), allocator);
|
||||
}
|
||||
|
@ -249,18 +252,14 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
|
|||
# endif
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
case IConfig::StressKey: /* --stress */
|
||||
case IConfig::BenchKey: /* --bench */
|
||||
set(doc, CpuConfig::kField, CpuConfig::kHugePagesJit, true);
|
||||
set(doc, CpuConfig::kField, CpuConfig::kPriority, 2);
|
||||
set(doc, CpuConfig::kField, CpuConfig::kYield, false);
|
||||
|
||||
add(doc, Pools::kPools, Pool::kUser, Pool::kBenchmark);
|
||||
|
||||
if (key == IConfig::BenchKey) {
|
||||
add(doc, Pools::kPools, Pool::kBenchmark, arg);
|
||||
}
|
||||
break;
|
||||
case IConfig::AlgorithmKey: /* --algo */
|
||||
case IConfig::BenchKey: /* --bench */
|
||||
case IConfig::StressKey: /* --stress */
|
||||
case IConfig::BenchSubmitKey: /* --submit */
|
||||
case IConfig::BenchVerifyKey: /* --verify */
|
||||
case IConfig::BenchSeedKey: /* --seed */
|
||||
case IConfig::BenchHashKey: /* --hash */
|
||||
return transformBenchmark(doc, key, arg);
|
||||
# endif
|
||||
|
||||
default:
|
||||
|
@ -310,3 +309,36 @@ void xmrig::ConfigTransform::transformUint64(rapidjson::Document &doc, int key,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef XMRIG_FEATURE_BENCHMARK
|
||||
void xmrig::ConfigTransform::transformBenchmark(rapidjson::Document &doc, int key, const char *arg)
|
||||
{
|
||||
set(doc, CpuConfig::kField, CpuConfig::kHugePagesJit, true);
|
||||
set(doc, CpuConfig::kField, CpuConfig::kPriority, 2);
|
||||
set(doc, CpuConfig::kField, CpuConfig::kYield, false);
|
||||
|
||||
switch (key) {
|
||||
case IConfig::AlgorithmKey: /* --algo */
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kAlgo, arg);
|
||||
|
||||
case IConfig::BenchKey: /* --bench */
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kSize, arg);
|
||||
|
||||
case IConfig::StressKey: /* --stress */
|
||||
return add(doc, Pools::kPools, Pool::kUser, BenchConfig::kBenchmark);
|
||||
|
||||
case IConfig::BenchSubmitKey: /* --submit */
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kSubmit, true);
|
||||
|
||||
case IConfig::BenchVerifyKey: /* --verify */
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kVerify, arg);
|
||||
|
||||
case IConfig::BenchSeedKey: /* --seed */
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kSeed, arg);
|
||||
|
||||
case IConfig::BenchHashKey: /* --hash */
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kHash, arg);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -42,6 +42,10 @@ private:
|
|||
void transformBoolean(rapidjson::Document &doc, int key, bool enable);
|
||||
void transformUint64(rapidjson::Document &doc, int key, uint64_t arg);
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
void transformBenchmark(rapidjson::Document &doc, int key, const char *arg);
|
||||
# endif
|
||||
|
||||
bool m_opencl = false;
|
||||
int64_t m_affinity = -1;
|
||||
uint64_t m_intensity = 1;
|
||||
|
|
|
@ -104,6 +104,10 @@ static const option options[] = {
|
|||
{ "stress", 0, nullptr, IConfig::StressKey },
|
||||
{ "bench", 1, nullptr, IConfig::BenchKey },
|
||||
{ "benchmark", 1, nullptr, IConfig::BenchKey },
|
||||
{ "submit", 0, nullptr, IConfig::BenchSubmitKey },
|
||||
{ "verify", 1, nullptr, IConfig::BenchVerifyKey },
|
||||
{ "seed", 1, nullptr, IConfig::BenchSeedKey },
|
||||
{ "hash", 1, nullptr, IConfig::BenchHashKey },
|
||||
# endif
|
||||
# ifdef XMRIG_FEATURE_TLS
|
||||
{ "tls", 0, nullptr, IConfig::TlsKey },
|
||||
|
|
|
@ -181,7 +181,11 @@ static inline const std::string &usage()
|
|||
|
||||
# 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";
|
||||
u += " --bench=N run benchmark, N can be between 1M and 10M\n";
|
||||
u += " --submit perform an online benchmark and submit result for sharing\n";
|
||||
u += " --verify=ID verify submitted benchmark by ID\n";
|
||||
u += " --seed=SEED custom RandomX seed for benchmark\n";
|
||||
u += " --hash=HASH compare benchmark result with specified hash\n";
|
||||
# endif
|
||||
|
||||
return u;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue