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
commit f3ea3c5227
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,