My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions | Variables
profiler.c File Reference

For profiling the path of MSU messages through DeDOS. More...

#include "profiler.h"
#include "stats.h"
#include "logging.h"
#include "rt_stats.h"

Go to the source code of this file.

Macros

#define N_PROF_STAT_IDS   sizeof(profiler_stat_ids) / sizeof(*profiler_stat_ids)
 

Functions

void set_profiling (struct msu_msg_hdr *hdr)
 Sets the profiling flag on the header based on the tag_probability. More...
 
void init_profiler (float tag_prob)
 Initializes the profiler to tag headers with tag_prob probability. More...
 

Variables

static float tag_probability = -1
 The probability that an MSU message will get marked for profiling. More...
 
enum stat_id profiler_stat_ids []
 The stat IDs relevant to profiling. More...
 

Detailed Description

For profiling the path of MSU messages through DeDOS.

Definition in file profiler.c.

Macro Definition Documentation

#define N_PROF_STAT_IDS   sizeof(profiler_stat_ids) / sizeof(*profiler_stat_ids)

Definition at line 42 of file profiler.c.

Function Documentation

void init_profiler ( float  tag_prob)

Initializes the profiler to tag headers with tag_prob probability.

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 on the header based on the tag_probability.

Sets the profiling flag in the header based on the tag_probability provided to init_profiler.

Definition at line 45 of file profiler.c.

Variable Documentation

enum stat_id profiler_stat_ids[]
Initial value:

The stat IDs relevant to profiling.

Definition at line 34 of file profiler.c.

float tag_probability = -1
static

The probability that an MSU message will get marked for profiling.

Definition at line 31 of file profiler.c.