18 #include "scanner/util/util.h" 38 extern ProfilerLevel PROFILER_LEVEL;
46 void add_interval(
const std::string& key, timepoint_t start, timepoint_t end, ProfilerLevel level=ProfilerLevel::Info);
48 void increment(
const std::string& key, int64_t value);
50 void reset(timepoint_t base_time);
58 const std::vector<TaskRecord>& get_records()
const;
60 const std::map<std::string, int64_t>& get_counters()
const;
66 timepoint_t base_time_;
67 std::atomic_flag lock_;
68 std::vector<TaskRecord> records_;
69 std::map<std::string, int64_t> counters_;
82 void write_profiler_to_file(storehouse::WriteFile* file, int64_t node,
83 std::string type_name, std::string tag,
84 int64_t worker_num,
const Profiler& profiler);
88 #include "scanner/util/profiler.inl" Definition: profiler.h:26
Definition: profiler.h:40
Definition: profiler.h:52
Definition: database.cpp:36
Definition: profiler.h:72