Mercurial > hg > freeDiameter
comparison include/freeDiameter/libfdproto.h @ 1060:13fc3fc9c789
New feature in fd_fifo to get timing statistics
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Mon, 29 Apr 2013 17:15:34 +0800 |
parents | b3d623f04b6d |
children | 23989d6c8390 |
comparison
equal
deleted
inserted
replaced
1057:1c6c8fa622ff | 1060:13fc3fc9c789 |
---|---|
3034 * FUNCTION: fd_fifo_length | 3034 * FUNCTION: fd_fifo_length |
3035 * | 3035 * |
3036 * PARAMETERS: | 3036 * PARAMETERS: |
3037 * queue : The queue from which to retrieve the number of elements. | 3037 * queue : The queue from which to retrieve the number of elements. |
3038 * length : Upon success, the current number of elements in the queue is stored here. | 3038 * length : Upon success, the current number of elements in the queue is stored here. |
3039 * max : the maximum number of elements as specified during creation. Can be NULL. | |
3039 * | 3040 * |
3040 * DESCRIPTION: | 3041 * DESCRIPTION: |
3041 * Retrieve the number of elements in a queue. | 3042 * Retrieve the number of elements in a queue. |
3042 * | 3043 * |
3043 * RETURN VALUE: | 3044 * RETURN VALUE: |
3044 * 0 : The length of the queue has been written. | 3045 * 0 : The length of the queue has been written. |
3045 * EINVAL : A parameter is invalid. | 3046 * EINVAL : A parameter is invalid. |
3046 */ | 3047 */ |
3047 int fd_fifo_length ( struct fifo * queue, int * length ); | 3048 int fd_fifo_length ( struct fifo * queue, int * length, int * max); |
3048 int fd_fifo_length_noerr ( struct fifo * queue ); /* no error checking version */ | 3049 int fd_fifo_length_noerr ( struct fifo * queue ); /* no error checking version */ |
3050 | |
3051 /* | |
3052 * FUNCTION: fd_fifo_getstats | |
3053 * | |
3054 * PARAMETERS: | |
3055 * queue : The queue from which to retrieve the timings information. | |
3056 * total : Cumulated time all items spent in this queue, including blocking time (always growing, use deltas for monitoring) | |
3057 * blocking : Cumulated time threads trying to post new items were blocked (queue full). | |
3058 * last : For the last element retrieved from the queue, how long it take between posting (including blocking) and poping | |
3059 * | |
3060 * DESCRIPTION: | |
3061 * Retrieve the timing information associated with a queue, for monitoring purpose. | |
3062 * | |
3063 * RETURN VALUE: | |
3064 * 0 : The statistics have been updated. | |
3065 * EINVAL : A parameter is invalid. | |
3066 */ | |
3067 int fd_fifo_getstats( struct fifo * queue, struct timespec * total, struct timespec * blocking, struct timespec * last); | |
3068 | |
3049 | 3069 |
3050 /* | 3070 /* |
3051 * FUNCTION: fd_fifo_setthrhd | 3071 * FUNCTION: fd_fifo_setthrhd |
3052 * | 3072 * |
3053 * PARAMETERS: | 3073 * PARAMETERS: |