in fbpcf/perf/PerfUtil.h [34:48]
std::function<R(Args...)> decorate(
const std::string& fName,
const std::function<R(Args...)>& f) {
return [fName, f](Args... args) {
auto start = std::chrono::high_resolution_clock::now();
auto res = f(std::forward<Args>(args)...);
auto stop = std::chrono::high_resolution_clock::now();
auto duration =
std::chrono::duration_cast<std::chrono::milliseconds>(stop - start);
XLOGF(INFO, "{} execution time (ms): {}", fName, duration.count());
return res;
};
}