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:
Robin Sommer 2016-05-06 17:34:24 -07:00
commit 00d94f1bbc
53 changed files with 887 additions and 498 deletions

View file

@ -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)