mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 21:18:20 +00:00
Merge remote-tracking branch 'origin/topic/seth/stats-improvement'
(Cleaned up some code a little bit.) * origin/topic/seth/stats-improvement: Fixing tests for stats improvements Rename the reporting interval variable for stats. Removing more broken functionality due to changed stats apis. Removing some references to resource_usage() Removing Broker stats, it was broken and incomplete. Fixing default stats collection interval to every 5 minutes. Add DNS stats to the stats.log Small stats script tweaks and beginning broker stats. Continued stats cleanup and extension. More stats collection extensions. More stats improvements Slight change to Mach API for collecting memory usage. Fixing some small mistakes. Updating the cmake submodule for the stats updates. Fix memory usage collection on Mac OS X. Cleaned up stats collection. BIT-1581 #merged
This commit is contained in:
commit
00d94f1bbc
53 changed files with 887 additions and 498 deletions
10
src/cq.c
10
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,9 @@ 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 +418,12 @@ 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