For profiling the path of MSU messages through DeDOS. More...
Go to the source code of this file.
Macros | |
#define | PROFILER_ITEM_ID 101 |
The ID with which all profiled messages are tagged in the stats module. More... | |
#define | SET_PROFILING(hdr) |
Sets whether the header should be profiled. More... | |
#define | INIT_PROFILER(tprof) |
Initializes the profiler with the provided probability of profiling. More... | |
#define | PROFILE_EVENT(hdr, stat_id) |
If the header is marked for profiling, profiles the given event. More... | |
Functions | |
void | set_profiling (struct msu_msg_hdr *hdr) |
Sets the profiling flag in the header based on the tag_probability provided to init_profiler. More... | |
void | init_profiler (float tag_probability) |
Sets the probability of profiling an MSU message. More... | |
For profiling the path of MSU messages through DeDOS.
Note: #DEDOS_PROFILER must be defined for profiling to do anything!
Definition in file profiler.h.
#define INIT_PROFILER | ( | tprof | ) |
Initializes the profiler with the provided probability of profiling.
Ignored if #DEDOS_PROFILE is not defined
Definition at line 69 of file profiler.h.
#define PROFILE_EVENT | ( | hdr, | |
stat_id | |||
) |
If the header is marked for profiling, profiles the given event.
Ignored if #DEDOS_PROFILE is not defined.
Definition at line 77 of file profiler.h.
#define PROFILER_ITEM_ID 101 |
The ID with which all profiled messages are tagged in the stats module.
Definition at line 34 of file profiler.h.
#define SET_PROFILING | ( | hdr | ) |
Sets whether the header should be profiled.
Ignored if #DEDOS_PROFILE is not defined
Definition at line 65 of file profiler.h.
void init_profiler | ( | float | tag_prob | ) |
Sets the probability of profiling an MSU message.
Sets the probability of profiling an MSU message.
Definition at line 58 of file profiler.c.
void set_profiling | ( | struct msu_msg_hdr * | hdr | ) |
Sets the profiling flag in the header based on the tag_probability provided to init_profiler.
Sets the profiling flag in the header based on the tag_probability provided to init_profiler.
Definition at line 45 of file profiler.c.