[Kamailio-Devel] calculating average statistics

Juha Heinanen jh at tutpro.com
Mon Aug 25 20:58:36 CEST 2008


i'm not sure if current statistics.h interface allows keeping track of
average of something.  if i use get_stat to get the current average and
current count value, do my calculation of new average and then update
average and count values, some other process may have in the meanwhile
done its update and thus messed up my calculation.

in order to solve this, should there be a new update_average_stat macro
that does the above under a lock?

-- juha





More information about the Devel mailing list