Go to the documentation of this file.
19 #ifndef GRPC_CORE_LIB_PROFILING_TIMERS_H
20 #define GRPC_CORE_LIB_PROFILING_TIMERS_H
36 #if !(defined(GRPC_STAP_PROFILER) + defined(GRPC_BASIC_PROFILER) + \
37 defined(GRPC_CUSTOM_PROFILER))
39 #define GPR_TIMER_MARK(tag, important) \
43 #define GPR_TIMER_SCOPE(tag, important) \
49 #if defined(GRPC_STAP_PROFILER) && defined(GRPC_BASIC_PROFILER)
50 #error "GRPC_STAP_PROFILER and GRPC_BASIC_PROFILER are mutually exclusive."
52 #if defined(GRPC_STAP_PROFILER) && defined(GRPC_CUSTOM_PROFILER)
53 #error "GRPC_STAP_PROFILER and GRPC_CUSTOM_PROFILER are mutually exclusive."
55 #if defined(GRPC_CUSTOM_PROFILER) && defined(GRPC_BASIC_PROFILER)
56 #error "GRPC_CUSTOM_PROFILER and GRPC_BASIC_PROFILER are mutually exclusive."
60 #define GPR_TIMER_MARK(tag, important) \
61 gpr_timer_add_mark(tag, important, __FILE__, __LINE__);
63 #ifdef GRPC_STAP_PROFILER
67 #ifdef GRPC_BASIC_PROFILER
74 ProfileScope(
const char*
desc,
bool important,
const char*
file,
int line)
81 const char*
const desc_;
85 #define GPR_TIMER_SCOPE_NAME_INTERNAL(prefix, line) prefix##line
86 #define GPR_TIMER_SCOPE_NAME(prefix, line) \
87 GPR_TIMER_SCOPE_NAME_INTERNAL(prefix, line)
88 #define GPR_TIMER_SCOPE(tag, important) \
89 ::grpc::ProfileScope GPR_TIMER_SCOPE_NAME(_profile_scope_, __LINE__)( \
90 (tag), (important), __FILE__, __LINE__)
void gpr_timers_set_log_filename(const char *filename)
void gpr_timers_global_destroy(void)
void gpr_timer_end(const char *tagstr, int important, const char *file, int line)
void gpr_timer_set_enabled(int enabled)
void gpr_timer_add_mark(const char *tagstr, int important, const char *file, int line)
void gpr_timer_begin(const char *tagstr, int important, const char *file, int line)
void gpr_timers_global_init(void)
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:38