Auto merge of #2613 - arielgabizon:load-wallet-benchmark, r=str4d

Add load-wallet benchmark

Closes #2518.
This commit is contained in:
Homu
2017-09-19 01:52:22 -07:00
4 changed files with 56 additions and 2 deletions

View File

@@ -2603,6 +2603,11 @@ UniValue zc_benchmark(const UniValue& params, bool fHelp)
}
auto amount = AmountFromValue(params[2]);
sample_times.push_back(benchmark_sendtoaddress(amount));
} else if (benchmarktype == "loadwallet") {
if (Params().NetworkIDString() != "regtest") {
throw JSONRPCError(RPC_TYPE_ERROR, "Benchmark must be run in regtest mode");
}
sample_times.push_back(benchmark_loadwallet());
} else {
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid benchmarktype");
}