stats.c File Reference

Include dependency graph for stats.c:


Functions

static int CounterUpdate (vlc_object_t *p_handler, counter_t *p_counter, vlc_value_t val, vlc_value_t *new_val)
 Update a statistics counter, according to its type If needed, perform a bit of computation (derivative, mostly) This function must be entered with stats handler lock.
static void TimerDump (vlc_object_t *p_this, counter_t *p_counter, bool)
counter_tstats_CounterCreate (vlc_object_t *p_this, int i_type, int i_compute_type)
 Create a statistics counter.
int stats_Update (vlc_object_t *p_this, counter_t *p_counter, vlc_value_t val, vlc_value_t *val_new)
 Update a counter element with new values.
int stats_Get (vlc_object_t *p_this, counter_t *p_counter, vlc_value_t *val)
 Get the aggregated value for a counter.
input_stats_tstats_NewInputStats (input_thread_t *p_input)
void stats_ComputeInputStats (input_thread_t *p_input, input_stats_t *p_stats)
void stats_ReinitInputStats (input_stats_t *p_stats)
void stats_DumpInputStats (input_stats_t *p_stats)
void stats_TimerStart (vlc_object_t *p_obj, const char *psz_name, unsigned int i_id)
void stats_TimerStop (vlc_object_t *p_obj, unsigned int i_id)
void stats_TimerDump (vlc_object_t *p_obj, unsigned int i_id)
void stats_TimersDumpAll (vlc_object_t *p_obj)
void stats_TimerClean (vlc_object_t *p_obj, unsigned int i_id)
void stats_TimersCleanAll (vlc_object_t *p_obj)
void stats_CounterClean (counter_t *p_c)

Function Documentation

static int CounterUpdate ( vlc_object_t p_handler,
counter_t p_counter,
vlc_value_t  val,
vlc_value_t new_val 
) [static]

Update a statistics counter, according to its type If needed, perform a bit of computation (derivative, mostly) This function must be entered with stats handler lock.

Parameters:
p_counter the counter to update
val the "new" value
Returns:
an error code

References counter_sample_t::date, vlc_value_t::f_float, counter_t::i_compute_type, vlc_value_t::i_int, counter_t::i_samples, counter_t::i_type, INSERT_ELEM, counter_t::last_update, mdate(), msg_Err, counter_t::pp_samples, counter_t::psz_name, vlc_value_t::psz_string, REMOVE_ELEM, STATS_COUNTER, STATS_DERIVATIVE, STATS_LAST, STATS_MAX, STATS_MIN, counter_t::update_interval, counter_sample_t::value, VLC_EGENERIC, VLC_SUCCESS, VLC_VAR_FLOAT, VLC_VAR_INTEGER, and VLC_VAR_STRING.

Referenced by stats_Update().

void stats_ComputeInputStats ( input_thread_t p_input,
input_stats_t p_stats 
)

void stats_CounterClean ( counter_t p_c  ) 

counter_t* stats_CounterCreate ( vlc_object_t p_this,
int  i_type,
int  i_compute_type 
)

Create a statistics counter.

Parameters:
p_this a VLC object
i_type the type of stored data. One of VLC_VAR_STRING, VLC_VAR_INTEGER, VLC_VAR_FLOAT
i_compute_type the 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::i_type, counter_t::last_update, counter_t::pp_samples, counter_t::psz_name, and counter_t::update_interval.

void stats_DumpInputStats ( input_stats_t p_stats  ) 

int stats_Get ( vlc_object_t p_this,
counter_t p_counter,
vlc_value_t val 
)

Get the aggregated value for a counter.

Parameters:
p_this an object
p_counter the counter
val a pointer to an initialized vlc_value union. It will contain the retrieved value
Returns:
an error code

References counter_sample_t::date, vlc_value_t::f_float, counter_t::i_compute_type, vlc_value_t::i_int, counter_t::i_samples, counter_t::i_type, libvlc_stats, counter_t::pp_samples, STATS_COUNTER, STATS_DERIVATIVE, STATS_LAST, STATS_MAX, STATS_MIN, counter_sample_t::value, VLC_EGENERIC, VLC_SUCCESS, and VLC_VAR_INTEGER.

input_stats_t* stats_NewInputStats ( input_thread_t p_input  ) 

void stats_ReinitInputStats ( input_stats_t p_stats  ) 

int stats_Update ( vlc_object_t p_this,
counter_t p_counter,
vlc_value_t  val,
vlc_value_t val_new 
)

Update a counter element with new values.

Parameters:
p_this a VLC object
p_counter the counter to update
val the vlc_value union containing the new value to aggregate. For more information on how data is aggregated,
See also:
stats_Create
Parameters:
val_new a pointer that will be filled with new data

References CounterUpdate(), libvlc_stats, and VLC_EGENERIC.

Referenced by stats_UpdateFloat(), and stats_UpdateInteger().

static void TimerDump ( vlc_object_t p_this,
counter_t p_counter,
bool  b_total 
) [static]


Generated on Tue May 25 08:05:36 2010 for VLC by  doxygen 1.5.6