5 #include <xgboost/logging.h>
17 using ClockT = std::chrono::high_resolution_clock;
18 using TimePointT = std::chrono::high_resolution_clock::time_point;
19 using DurationT = std::chrono::high_resolution_clock::duration;
20 using SecondsT = std::chrono::duration<double>;
34 snprintf(buffer,
sizeof(buffer),
"%s:\t %fs", label.c_str(),
36 LOG(CONSOLE) << buffer;
56 using StatMap = std::map<std::string, std::pair<size_t, size_t>>;
58 std::string label_ =
"";
59 std::map<std::string, Statistics> statistics_map_;
62 void PrintStatistics(StatMap
const& statistics)
const;
80 void Init(std::string label) { this->label_ = label; }
81 void Start(
const std::string &name);
82 void Stop(
const std::string &name);