Auto merge of #3611 - bitcartel:3467_add_sapling_benchmarks, r=bitcartel

Closes #3467. Add benchmarks for Sapling spends and outputs.

Four new benchmarks are added to RPC zcbenchmark:
- createsaplingspend
- createsaplingoutput
- verifysaplingspend
- verifysaplingoutput
This commit is contained in:
Homu
2018-10-23 22:52:22 -07:00
3 changed files with 170 additions and 0 deletions

View File

@@ -2800,6 +2800,14 @@ UniValue zc_benchmark(const UniValue& params, bool fHelp)
sample_times.push_back(benchmark_loadwallet());
} else if (benchmarktype == "listunspent") {
sample_times.push_back(benchmark_listunspent());
} else if (benchmarktype == "createsaplingspend") {
sample_times.push_back(benchmark_create_sapling_spend());
} else if (benchmarktype == "createsaplingoutput") {
sample_times.push_back(benchmark_create_sapling_output());
} else if (benchmarktype == "verifysaplingspend") {
sample_times.push_back(benchmark_verify_sapling_spend());
} else if (benchmarktype == "verifysaplingoutput") {
sample_times.push_back(benchmark_verify_sapling_output());
} else {
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid benchmarktype");
}