Auto merge of #1870 - str4d:1749-benchmark-rescanning, r=str4d

Add benchmarks for rescan components

Part of #1749.
This commit is contained in:
zkbot
2016-12-09 07:12:22 +00:00
9 changed files with 272 additions and 125 deletions

View File

@@ -2480,6 +2480,12 @@ Value zc_benchmark(const json_spirit::Array& params, bool fHelp)
sample_times.push_back(benchmark_verify_equihash());
} else if (benchmarktype == "validatelargetx") {
sample_times.push_back(benchmark_large_tx());
} else if (benchmarktype == "trydecryptnotes") {
int nAddrs = params[2].get_int();
sample_times.push_back(benchmark_try_decrypt_notes(nAddrs));
} else if (benchmarktype == "incnotewitnesses") {
int nTxs = params[2].get_int();
sample_times.push_back(benchmark_increment_note_witnesses(nTxs));
} else {
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid benchmarktype");
}