Measure multithreaded solveequihash time per-thread
This commit is contained in:
@@ -2447,10 +2447,11 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp)
|
||||
sample_times.push_back(benchmark_verify_joinsplit(samplejoinsplit));
|
||||
} else if (benchmarktype == "solveequihash") {
|
||||
if (params.size() < 3) {
|
||||
sample_times.push_back(benchmark_solve_equihash(true));
|
||||
sample_times.push_back(benchmark_solve_equihash());
|
||||
} else {
|
||||
int nThreads = params[2].get_int();
|
||||
sample_times.push_back(benchmark_solve_equihash_threaded(nThreads));
|
||||
std::vector<double> vals = benchmark_solve_equihash_threaded(nThreads);
|
||||
sample_times.insert(sample_times.end(), vals.begin(), vals.end());
|
||||
}
|
||||
} else if (benchmarktype == "verifyequihash") {
|
||||
sample_times.push_back(benchmark_verify_equihash());
|
||||
@@ -2462,9 +2463,9 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp)
|
||||
}
|
||||
|
||||
Array results;
|
||||
for (int i = 0; i < samplecount; i++) {
|
||||
for (auto time : sample_times) {
|
||||
Object result;
|
||||
result.push_back(Pair("runningtime", sample_times.at(i)));
|
||||
result.push_back(Pair("runningtime", time));
|
||||
results.push_back(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user