Insight support for jobs:

* Add insight Groups to Application singleton
* Put JobQueue metrics into "jobq" Group
* Add queued time to Job
* Add per-type Job queue time metrics
* Add per-type Job execution time metrics
* Break JobQueue sources out of the namespace
* Use free function to create the JobQueue
This commit is contained in:
Vinnie Falco
2014-02-08 09:33:30 -08:00
parent a681a4fcd4
commit f469e3853d
9 changed files with 154 additions and 40 deletions

View File

@@ -184,7 +184,8 @@ public:
void operator() (Duration const& elapsed) const
{
auto ms (ceil <std::chrono::milliseconds> (elapsed));
latency.notify (ms);
if (ms.count() >= 10)
latency.notify (ms);
if (ms.count() >= 500)
journal.warning <<
"io_service latency = " << ms;
@@ -235,9 +236,8 @@ public:
// The JobQueue has to come pretty early since
// almost everything is a Stoppable child of the JobQueue.
//
, m_jobQueue (JobQueue::New (
m_collectorManager->collector (),
m_nodeStoreScheduler, LogPartition::getJournal <JobQueueLog> ()))
, m_jobQueue (make_JobQueue (m_collectorManager->group ("jobq"),
m_nodeStoreScheduler, LogPartition::getJournal <JobQueueLog> ()))
// The io_service must be a child of the JobQueue since we call addJob
// in response to newtwork data from peers and also client requests.