Allow to use integer numbers in algo-perf again

This commit is contained in:
MoneroOcean 2019-07-22 13:37:23 -07:00
parent 8c5184e8d2
commit 45ab3b4e26

View file

@ -76,12 +76,17 @@ void Benchmark::read(const rapidjson::Value &value)
LOG_ALERT("Ignoring wrong algo-perf name %s", member.name.GetString()); LOG_ALERT("Ignoring wrong algo-perf name %s", member.name.GetString());
continue; continue;
} }
if (!member.value.IsFloat()) { if (member.value.IsFloat()) {
LOG_ALERT("Ignoring wrong value for %s algo-perf", member.name.GetString()); algo_perf[algo.id()] = member.value.GetFloat();
m_isNewBenchRun = false;
continue; continue;
} }
algo_perf[algo.id()] = member.value.GetFloat(); if (member.value.IsInt()) {
m_isNewBenchRun = false; algo_perf[algo.id()] = member.value.GetInt();
m_isNewBenchRun = false;
continue;
}
LOG_ALERT("Ignoring wrong value for %s algo-perf", member.name.GetString());
} }
} }
} }