functions related to load calculations More...
#include "gnunet_load_lib.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_LOAD_Value |
Values we track for load calculations. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "util-load", __VA_ARGS__) |
Functions | |
static void | internal_update (struct GNUNET_LOAD_Value *load) |
struct GNUNET_LOAD_Value * | GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative autodecline) |
Create a new load value. More... | |
void | GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load, struct GNUNET_TIME_Relative autodecline) |
Change the value by which the load automatically declines. More... | |
static void | calculate_load (struct GNUNET_LOAD_Value *load) |
Recalculate our load value. More... | |
double | GNUNET_LOAD_get_load (struct GNUNET_LOAD_Value *load) |
Get the current load. More... | |
double | GNUNET_LOAD_get_average (struct GNUNET_LOAD_Value *load) |
Get the average value given to update so far. More... | |
void | GNUNET_LOAD_update (struct GNUNET_LOAD_Value *load, uint64_t data) |
Update the current load. More... | |
functions related to load calculations
Definition in file load.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "util-load", __VA_ARGS__) |
|
static |
Definition at line 83 of file load.c.
References delta, GNUNET_TIME_absolute_get_duration(), GNUNET_TIME_UNIT_FOREVER_REL, load(), and GNUNET_TIME_Relative::rel_value_us.
Referenced by GNUNET_LOAD_get_average(), GNUNET_LOAD_get_load(), GNUNET_LOAD_update(), and GNUNET_LOAD_value_set_decline().
|
static |
Recalculate our load value.
load | load to update |
Definition at line 156 of file load.c.
References load().
Referenced by GNUNET_LOAD_get_load().