From 50bffd39d8ba5d10d29b6937971b4d0238dd1afd Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Mon, 17 May 2021 01:13:06 -0600 Subject: [PATCH] Check and save any autosized algos before launching the moBenchmark --- src/App.cpp | 3 +++ src/core/MoBenchmark.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/src/App.cpp b/src/App.cpp index 01c50594..681fd0db 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -90,6 +90,9 @@ int xmrig::App::exec() m_controller->config()->benchmark().set_controller(m_controller); if (m_controller->config()->benchmark().isNewBenchRun() || m_controller->config()->isRebenchAlgo()) { + if (m_controller->config()->isShouldSave()) { + m_controller->config()->save(); + } m_controller->config()->benchmark().start(); } else { m_controller->start(); diff --git a/src/core/MoBenchmark.cpp b/src/core/MoBenchmark.cpp index c60976d6..e433783f 100644 --- a/src/core/MoBenchmark.cpp +++ b/src/core/MoBenchmark.cpp @@ -77,6 +77,7 @@ rapidjson::Value MoBenchmark::toJSON(rapidjson::Document &doc) const Value obj(kObjectType); for (const auto &a : m_controller->miner()->algorithms()) { + if (algo_perf[a.id()] == 0.0f) continue; obj.AddMember(StringRef(a.shortName()), algo_perf[a.id()], allocator); }