1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-09 00:33:33 -05:00

Merge pull request #1897 from SChernykh/dev

Benchmark: added more check hashes and a progress indicator
This commit is contained in:
xmrig
2020-10-15 15:08:33 +07:00
committed by GitHub
6 changed files with 42 additions and 30 deletions

View File

@@ -86,6 +86,9 @@ const char *Pool::kBenchmark = "benchmark";
const char *Pool::kNicehashHost = "nicehash.com";
uint32_t Pool::benchProgress = 0;
}
@@ -136,11 +139,13 @@ xmrig::Pool::Pool(const rapidjson::Value &object) :
const char* benchSize = Json::getString(object, kBenchmark, nullptr);
if (benchSize) {
if (strcasecmp(benchSize, "1M") == 0) {
m_benchSize = 1000000;
}
else if (strcasecmp(benchSize, "10M") == 0) {
m_benchSize = 10000000;
std::string s;
for (int i = 1; i <= 10; ++i) {
s = std::to_string(i) + "M";
if (strcasecmp(benchSize, s.c_str()) == 0) {
m_benchSize = i * 1000000;
break;
}
}
}

View File

@@ -121,6 +121,8 @@ public:
void print() const;
# endif
static uint32_t benchProgress;
private:
enum Flags {
FLAG_ENABLED,