mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-18 11:52:44 -05:00
Added draft support for multi backend benchmark
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
#include "net/JobResults.h"
|
#include "net/JobResults.h"
|
||||||
#include "net/Network.h"
|
#include "net/Network.h"
|
||||||
#include "rapidjson/document.h"
|
#include "rapidjson/document.h"
|
||||||
|
#include "backend/common/interfaces/IBackend.h"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
@@ -138,7 +139,7 @@ void Benchmark::start(const BenchAlgo bench_algo) {
|
|||||||
// calculate number of active miner backends in m_enabled_backend_count
|
// calculate number of active miner backends in m_enabled_backend_count
|
||||||
m_enabled_backend_count = 0;
|
m_enabled_backend_count = 0;
|
||||||
const Algorithm algo(ba2a[bench_algo]);
|
const Algorithm algo(ba2a[bench_algo]);
|
||||||
for (IBackend *backend : m_controller->miner()->backends()) if (backend->isEnabled(algo)) ++ m_enabled_backend_count;
|
for (auto backend : m_controller->miner()->backends()) if (backend->isEnabled(algo)) ++ m_enabled_backend_count;
|
||||||
if (m_enabled_backend_count == 0) {
|
if (m_enabled_backend_count == 0) {
|
||||||
run_next_bench_algo(m_bench_algo);
|
run_next_bench_algo(m_bench_algo);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user