Add algo-min-time option same as meta-miner
This commit is contained in:
parent
22ab8c6254
commit
28b86148ed
8 changed files with 27 additions and 3 deletions
|
@ -202,7 +202,7 @@ bool xmrig::Config::isShouldSave() const
|
|||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
# ifdef XMRIG_FEATURE_MO_BENCHMARK
|
||||
if (m_benchmark.isNewBenchRun()) {
|
||||
return true;
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ bool xmrig::Config::read(const IJsonReader &reader, const char *fileName)
|
|||
d_ptr->healthPrintTime = reader.getUint(kHealthPrintTime, d_ptr->healthPrintTime);
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
# ifdef XMRIG_FEATURE_MO_BENCHMARK
|
||||
m_benchmark.read(reader.getValue(kAlgoPerf));
|
||||
# endif
|
||||
|
||||
|
@ -314,9 +314,10 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
|
|||
doc.AddMember(StringRef(kVerbose), Log::verbose(), allocator);
|
||||
doc.AddMember(StringRef(kWatch), m_watch, allocator);
|
||||
|
||||
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||
# ifdef XMRIG_FEATURE_MO_BENCHMARK
|
||||
doc.AddMember(StringRef(kRebenchAlgo), isRebenchAlgo(), allocator);
|
||||
doc.AddMember(StringRef(kBenchAlgoTime), benchAlgoTime(), allocator);
|
||||
doc.AddMember(StringRef(kAlgoMinTime), algoMinTime(), allocator);
|
||||
doc.AddMember(StringRef(kAlgoPerf), m_benchmark.toJSON(doc), allocator);
|
||||
# endif
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ static const option options[] = {
|
|||
# ifdef XMRIG_FEATURE_MO_BENCHMARK
|
||||
{ "rebench-algo", 0, nullptr, IConfig::RebenchAlgoKey },
|
||||
{ "bench-algo-time", 1, nullptr, IConfig::BenchAlgoTimeKey },
|
||||
{ "algo-min-time", 1, nullptr, IConfig::AlgoMinTimeKey },
|
||||
# endif
|
||||
{ "no-color", 0, nullptr, IConfig::ColorKey },
|
||||
{ "no-huge-pages", 0, nullptr, IConfig::HugePagesKey },
|
||||
|
|
|
@ -204,6 +204,13 @@ static inline const std::string &usage()
|
|||
u += " --no-dmi disable DMI/SMBIOS reader\n";
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_FEATURE_MO_BENCHMARK
|
||||
u += "\nMoneroOcean Benchmark (algo-perf):\n";
|
||||
u += " --rebench-algo run algo-perf benchmark (default if config contains no algo-perf)\n";
|
||||
u += " --bench-algo-time=N run algo-perf benchmark this many seconds per algo (default: 10)\n";
|
||||
u += " --algo-min-time=N when mining, avoid switching more often than every N seconds (default: 0/disabled)\n";
|
||||
# endif
|
||||
|
||||
return u;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue