Add thread parameter to solveequihash benchmark

Closes #1147
This commit is contained in:
Jack Grigg
2016-08-05 15:05:38 +12:00
parent fbd90518e3
commit f7478de67f
5 changed files with 47 additions and 10 deletions

View File

@@ -2438,7 +2438,12 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp)
} else if (benchmarktype == "verifyjoinsplit") {
sample_times.push_back(benchmark_verify_joinsplit(samplejoinsplit));
} else if (benchmarktype == "solveequihash") {
sample_times.push_back(benchmark_solve_equihash());
if (params.size() < 3) {
sample_times.push_back(benchmark_solve_equihash(true));
} else {
int nThreads = params[2].get_int();
sample_times.push_back(benchmark_solve_equihash_threaded(nThreads));
}
} else if (benchmarktype == "verifyequihash") {
sample_times.push_back(benchmark_verify_equihash());
} else if (benchmarktype == "validatelargetx") {