mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 21:18:20 +00:00
More stats collection extensions.
This commit is contained in:
parent
6d836b7956
commit
3c71d4ffa8
8 changed files with 47 additions and 10 deletions
9
src/cq.c
9
src/cq.c
|
@ -42,6 +42,7 @@ struct cq_handle {
|
|||
int lowmark; /* low bucket threshold */
|
||||
int nextbucket; /* next bucket to check */
|
||||
int noresize; /* don't resize while we're resizing */
|
||||
uint64_t cumulative_num; /* cumulative entries ever enqueued */
|
||||
double lastpri; /* last priority */
|
||||
double ysize; /* length of a year */
|
||||
double bwidth; /* width of each bucket */
|
||||
|
@ -175,6 +176,7 @@ cq_enqueue(register struct cq_handle *hp, register double pri,
|
|||
}
|
||||
bp->pri = pri;
|
||||
bp->cookie = cookie;
|
||||
++hp->cumulative_num;
|
||||
if (++hp->qlen > hp->max_qlen)
|
||||
hp->max_qlen = hp->qlen;
|
||||
#ifdef DEBUG
|
||||
|
@ -414,6 +416,13 @@ cq_max_size(struct cq_handle *hp)
|
|||
return hp->max_qlen;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
cq_cumulative_num(struct cq_handle *hp)
|
||||
{
|
||||
return hp->cumulative_num;
|
||||
}
|
||||
|
||||
|
||||
/* Return without doing anything if we fail to allocate a new bucket array */
|
||||
static int
|
||||
cq_resize(register struct cq_handle *hp, register int grow)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue