diff --git a/src/App.cpp b/src/App.cpp index e0b735ca..01d1fed7 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -142,7 +142,7 @@ int App::exec() benchmark.start_perf_bench(xmrig::PerfAlgo::PA_CN); // start benchmarking from first PerfAlgo in the list } else { // save config here to have option to store automatically generated "threads" - if (m_controller->config()->isShouldSave() || m_controller->config()->isSaveConfig()) m_controller->config()->save(); + if (m_controller->config()->isShouldSave()) m_controller->config()->save(); m_controller->network()->connect(); } diff --git a/src/common/config/CommonConfig.cpp b/src/common/config/CommonConfig.cpp index 25918e3a..24d4b74f 100644 --- a/src/common/config/CommonConfig.cpp +++ b/src/common/config/CommonConfig.cpp @@ -48,7 +48,6 @@ xmrig::CommonConfig::CommonConfig() : m_dryRun(false), m_calibrateAlgo(false), m_calibrateAlgoTime(60), - m_saveConfig(false), m_syslog(false), # ifdef XMRIG_PROXY_PROJECT @@ -191,10 +190,6 @@ bool xmrig::CommonConfig::parseBoolean(int key, bool enable) m_calibrateAlgo = enable; break; - case IConfig::SaveConfigKey: /* --save-config */ - m_saveConfig = enable; - break; - default: break; } diff --git a/src/common/config/CommonConfig.h b/src/common/config/CommonConfig.h index 6ab0d42b..b5539bbe 100644 --- a/src/common/config/CommonConfig.h +++ b/src/common/config/CommonConfig.h @@ -51,7 +51,6 @@ public: inline bool isDryRun() const { return m_dryRun; } inline bool isCalibrateAlgo() const { return m_calibrateAlgo; } inline int calibrateAlgoTime() const { return m_calibrateAlgoTime; } - inline bool isSaveConfig() const { return m_saveConfig; } inline bool isSyslog() const { return m_syslog; } inline const char *apiToken() const { return m_apiToken.data(); } inline const char *apiWorkerId() const { return m_apiWorkerId.data(); } @@ -93,7 +92,6 @@ protected: bool m_dryRun; bool m_calibrateAlgo; int m_calibrateAlgoTime; - bool m_saveConfig; bool m_syslog; bool m_watch; int m_apiPort; diff --git a/src/config.json b/src/config.json index ede1ba6c..155167b0 100644 --- a/src/config.json +++ b/src/config.json @@ -34,6 +34,8 @@ "safe": false, "threads": null, "algo-perf": null, + "calibrate-algo": false, + "calibrate-algo-time": 60, "user-agent": null, "watch": false } \ No newline at end of file diff --git a/src/core/ConfigLoader_platform.h b/src/core/ConfigLoader_platform.h index 9ec6a2a5..7a69e575 100644 --- a/src/core/ConfigLoader_platform.h +++ b/src/core/ConfigLoader_platform.h @@ -91,7 +91,6 @@ Options:\n\ --api-worker-id=ID custom worker-id for API\n\ --api-ipv6 enable IPv6 support for API\n\ --api-no-restricted enable full remote access (only if API token set)\n\ - --save-config save config file including generated configuration\n\ -h, --help display this help and exit\n\ -V, --version output version information and exit\n\ "; @@ -114,9 +113,8 @@ static struct option const options[] = { { "cpu-priority", 1, nullptr, xmrig::IConfig::CPUPriorityKey }, { "donate-level", 1, nullptr, xmrig::IConfig::DonateLevelKey }, { "dry-run", 0, nullptr, xmrig::IConfig::DryRunKey }, - { "calibrate-algo", 0, nullptr, xmrig::IConfig::CalibrateAlgoKey }, + { "calibrate-algo", 0, nullptr, xmrig::IConfig::CalibrateAlgoKey }, { "calibrate-algo-time", 1, nullptr, xmrig::IConfig::CalibrateAlgoTimeKey }, - { "save-config", 0, nullptr, xmrig::IConfig::SaveConfigKey }, { "help", 0, nullptr, xmrig::IConfig::HelpKey }, { "keepalive", 0, nullptr, xmrig::IConfig::KeepAliveKey }, { "log-file", 1, nullptr, xmrig::IConfig::LogFileKey }, @@ -151,6 +149,8 @@ static struct option const config_options[] = { { "cpu-priority", 1, nullptr, xmrig::IConfig::CPUPriorityKey }, { "donate-level", 1, nullptr, xmrig::IConfig::DonateLevelKey }, { "dry-run", 0, nullptr, xmrig::IConfig::DryRunKey }, + { "calibrate-algo", 0, nullptr, xmrig::IConfig::CalibrateAlgoKey }, + { "calibrate-algo-time", 1, nullptr, xmrig::IConfig::CalibrateAlgoTimeKey }, { "huge-pages", 0, nullptr, xmrig::IConfig::HugePagesKey }, { "log-file", 1, nullptr, xmrig::IConfig::LogFileKey }, { "max-cpu-usage", 1, nullptr, xmrig::IConfig::MaxCPUUsageKey }, diff --git a/src/workers/Benchmark.cpp b/src/workers/Benchmark.cpp index add486d9..1663a9e9 100644 --- a/src/workers/Benchmark.cpp +++ b/src/workers/Benchmark.cpp @@ -80,7 +80,7 @@ void Benchmark::onJobResult(const JobResult& result) { start_perf_bench(next_pa); } else { // end of benchmarks and switching to jobs from the pool (network) m_pa = xmrig::PA_INVALID; - if (m_controller->config()->isShouldSave() || m_controller->config()->isSaveConfig()) m_controller->config()->save(); // save config with measured algo-perf + if (m_controller->config()->isShouldSave()) m_controller->config()->save(); // save config with measured algo-perf Workers::pause(); // do not compute anything before job from the pool m_controller->network()->connect(); }