VLC  3.0.21
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
stats.c File Reference
Include dependency graph for stats.c:

Functions

counter_tstats_CounterCreate (int i_compute_type)
 Create a statistics counter. More...
 
static int64_t stats_GetTotal (const counter_t *counter)
 
static float stats_GetRate (const counter_t *counter)
 
input_stats_tstats_NewInputStats (input_thread_t *p_input)
 
void stats_ComputeInputStats (input_thread_t *input, input_stats_t *st)
 
void stats_ReinitInputStats (input_stats_t *p_stats)
 
void stats_CounterClean (counter_t *p_c)
 
void stats_Update (counter_t *p_counter, uint64_t val, uint64_t *new_val)
 Update a counter element with new values. More...
 

Function Documentation

◆ stats_ComputeInputStats()

void stats_ComputeInputStats ( input_thread_t input,
input_stats_t st 
)

◆ stats_CounterClean()

void stats_CounterClean ( counter_t p_c)

◆ stats_CounterCreate()

counter_t* stats_CounterCreate ( int  i_compute_type)

Create a statistics counter.

Parameters
i_compute_typethe aggregation type. One of STATS_LAST (always keep the last value), STATS_COUNTER (increment by the passed value), STATS_MAX (keep the maximum passed value), STATS_MIN, or STATS_DERIVATIVE (keep a time derivative of the value)

References counter_t::i_compute_type, counter_t::i_samples, counter_t::last_update, and counter_t::pp_samples.

◆ stats_GetRate()

static float stats_GetRate ( const counter_t counter)
inlinestatic

◆ stats_GetTotal()

static int64_t stats_GetTotal ( const counter_t counter)
inlinestatic

◆ stats_NewInputStats()

input_stats_t* stats_NewInputStats ( input_thread_t p_input)

◆ stats_ReinitInputStats()

void stats_ReinitInputStats ( input_stats_t p_stats)

◆ stats_Update()

void stats_Update ( counter_t p_counter,
uint64_t  val,
uint64_t *  new_val 
)

Update a counter element with new values.

Parameters
p_counterthe counter to update
valthe vlc_value union containing the new value to aggregate. For more information on how data is aggregated,
See also
stats_Create
Parameters
val_newa pointer that will be filled with new data

References CLOCK_FREQ, counter_sample_t::date, counter_t::i_compute_type, counter_t::i_samples, counter_t::last_update, mdate(), counter_t::pp_samples, STATS_COUNTER, STATS_DERIVATIVE, TAB_APPEND, TAB_ERASE, TAB_INSERT, unlikely, and counter_sample_t::value.

Referenced by AStreamReadBlock(), AStreamReadStream(), EsOutSend(), and input_CreateFilename().