benchmark: timing pht insert operations

This commit is contained in:
kaldoran authored and Adrien Béraud committed 2016-06-07 11:47:17 -04:00
1 parent 0b232b1604
commit a5e3597e68
4 files changed
+37 -12

No files matched your search

+5 -1
View File
@@ -259,10 +259,14 @@ void cmd_loop(std::shared_ptr<DhtRunner>& dht, std::map<std::string, dht::indexa
}
std::cout << "Pht::lookup: done." << std::endl;
},
[](bool ok) {
[start](bool ok) {
if (not ok) {
std::cout << "Pht::lookup: dht Get failed." << std::endl;
}
auto end = std::chrono::high_resolution_clock::now();
std::cout << "Pht::lookup: took " << print_dt(end-start) << "s)" << std::endl;
}, exact_match.size() != 0 and exact_match == "false" ? false : true
);
}