Navigation


Changeset 1071:6ca6cadf209c in freeDiameter for include


Ignore:
Timestamp:
May 2, 2013, 12:22:31 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Implement the fd_stat_getstats function; changed prototype of fd_fifo_length.

Location:
include/freeDiameter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfdcore.h

    r1069 r1071  
    10971097 *  stat          : Which queue is being queried
    10981098 *  peer          : (depending on the stat parameter) which peer is being queried
    1099  *  len          : (out) The number of items in the queue currently
    1100  *  max           : (out) The max number of items the queue accepts before becoming blocking -- 0 means no max.
     1099 *  current_count : (out) The number of items in the queue currently
     1100 *  limit_count   : (out) The max number of items the queue accepts before becoming blocking -- 0 means no max.
    11011101 *  highest_count : (out) The highest count the queue has reached since startup
    11021102 *  total_count   : (out) Total number of items that this queue has processed (always growing, use deltas for monitoring)
     
    11141114 */
    11151115int fd_stat_getstats(enum fd_stat_type stat, struct peer_hdr * peer,
    1116                         int * len, int * max, int * highest_count, long long * total_count,
     1116                        int * current_count, int * limit_count, int * highest_count, long long * total_count,
    11171117                        struct timespec * total, struct timespec * blocking, struct timespec * last);
    11181118
  • include/freeDiameter/libfdproto.h

    r1067 r1071  
    30323032
    30333033/*
     3034 * FUNCTION:    fd_fifo_getstats
     3035 *
     3036 * PARAMETERS:
     3037 *  queue         : The queue from which to retrieve the information.
     3038 *  current_count : How many items in the queue at the time of execution. This changes each time an item is pushed or poped.
     3039 *  limit_count   : The maximum number of items allowed in this queue. This is specified during queue creation.
     3040 *  highest_count : The maximum number of items this queue has contained. This enables to see if limit_count count was reached.
     3041 *  total_count   : the total number of items that went through the queue (already pop'd). Always increasing.
     3042 *  total         : Cumulated time all items spent in this queue, including blocking time (always growing, use deltas for monitoring)
     3043 *  blocking      : Cumulated time threads trying to post new items were blocked (queue full).
     3044 *  last          : For the last element retrieved from the queue, how long it take between posting (including blocking) and poping
     3045 * 
     3046 * DESCRIPTION:
     3047 *  Retrieve the timing information associated with a queue, for monitoring purpose.
     3048 *
     3049 * RETURN VALUE:
     3050 *  0           : The statistics have been updated.
     3051 *  EINVAL      : A parameter is invalid.
     3052 */
     3053int fd_fifo_getstats( struct fifo * queue, int * current_count, int * limit_count, int * highest_count, long long * total_count,
     3054                                           struct timespec * total, struct timespec * blocking, struct timespec * last);
     3055
     3056/*
    30343057 * FUNCTION:    fd_fifo_length
    30353058 *
    30363059 * PARAMETERS:
    30373060 *  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.
    3039  *  max         : the maximum number of elements as specified during creation. Can be NULL.
    3040  *
    3041  * DESCRIPTION:
    3042  *  Retrieve the number of elements in a queue.
    3043  *
    3044  * RETURN VALUE:
    3045  *  0           : The length of the queue has been written.
    3046  *  EINVAL      : A parameter is invalid.
    3047  */
    3048 int fd_fifo_length ( struct fifo * queue, int * length, int * max);
    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  *  items       : the total number of items that went through the queue (already pop'd). Always increasing.
    3057  *  total       : Cumulated time all items spent in this queue, including blocking time (always growing, use deltas for monitoring)
    3058  *  blocking    : Cumulated time threads trying to post new items were blocked (queue full).
    3059  *  last        : For the last element retrieved from the queue, how long it take between posting (including blocking) and poping
    3060  * 
    3061  * DESCRIPTION:
    3062  *  Retrieve the timing information associated with a queue, for monitoring purpose.
    3063  *
    3064  * RETURN VALUE:
    3065  *  0           : The statistics have been updated.
    3066  *  EINVAL      : A parameter is invalid.
    3067  */
    3068 int fd_fifo_getstats( struct fifo * queue, long long *items, struct timespec * total, struct timespec * blocking, struct timespec * last);
    3069 
     3061 *
     3062 * DESCRIPTION:
     3063 *  Retrieve the number of elements in a queue, without error checking.
     3064 *
     3065 * RETURN VALUE:
     3066 *  The number of items currently queued.
     3067 */
     3068int fd_fifo_length ( struct fifo * queue );
    30703069
    30713070/*
Note: See TracChangeset for help on using the changeset viewer.