Changeset View
Changeset View
Standalone View
Standalone View
src/logging/timer.h
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | private: | ||||
//! Forwarded on to LogPrint if specified - has the effect of only | //! Forwarded on to LogPrint if specified - has the effect of only | ||||
//! outputing the timing log when a particular debug= category is specified. | //! outputing the timing log when a particular debug= category is specified. | ||||
const BCLog::LogFlags m_log_category{}; | const BCLog::LogFlags m_log_category{}; | ||||
}; | }; | ||||
} // namespace BCLog | } // namespace BCLog | ||||
#define LOG_TIME_MICROS(end_msg, ...) \ | #define LOG_TIME_MILLIS_WITH_CATEGORY(end_msg, log_category) \ | ||||
BCLog::Timer<std::chrono::microseconds> PASTE2( \ | |||||
logging_timer, __COUNTER__)(__func__, end_msg, ##__VA_ARGS__) | |||||
#define LOG_TIME_MILLIS(end_msg, ...) \ | |||||
BCLog::Timer<std::chrono::milliseconds> PASTE2( \ | BCLog::Timer<std::chrono::milliseconds> PASTE2( \ | ||||
logging_timer, __COUNTER__)(__func__, end_msg, ##__VA_ARGS__) | logging_timer, __COUNTER__)(__func__, end_msg, log_category) | ||||
#define LOG_TIME_SECONDS(end_msg, ...) \ | #define LOG_TIME_SECONDS(end_msg) \ | ||||
BCLog::Timer<std::chrono::seconds> PASTE2(logging_timer, __COUNTER__)( \ | BCLog::Timer<std::chrono::seconds> PASTE2(logging_timer, \ | ||||
__func__, end_msg, ##__VA_ARGS__) | __COUNTER__)(__func__, end_msg) | ||||
#endif // BITCOIN_LOGGING_TIMER_H | #endif // BITCOIN_LOGGING_TIMER_H |