//-------------------------------------------------------------------------- JobQueueImp (beast::insight::Collector::ptr const& collector, Stoppable& parent, beast::Journal journal) : JobQueue ("JobQueue", parent) , m_journal (journal) , m_lastJob (0) , m_invalidJobData (getJobTypes ().getInvalid (), collector) , m_processCount (0) , m_workers (*this, "JobQueue", 0) , m_cancelCallback (std::bind (&Stoppable::isStopping, this)) , m_collector (collector) { hook = m_collector->make_hook (std::bind ( &JobQueueImp::collect, this)); job_count = m_collector->make_gauge ("job_count"); { ScopedLock lock (m_mutex); for (auto const& x : getJobTypes ()) { JobTypeInfo const& jt = x.second; // And create dynamic information for all jobs auto const result (m_jobData.emplace (std::piecewise_construct, std::forward_as_tuple (jt.type ()), std::forward_as_tuple (jt, m_collector))); assert (result.second == true); (void) result.second; } } }
InboundLedgersImp (clock_type& clock, Stoppable& parent, beast::insight::Collector::ptr const& collector) : Stoppable ("InboundLedgers", parent) , m_clock (clock) , mRecentFailures ("LedgerAcquireRecentFailures", clock, 0, kReacquireIntervalSeconds) , mCounter(collector->make_counter("ledger_fetches")) { }
LedgerHistory::LedgerHistory ( beast::insight::Collector::ptr const& collector) : collector_ (collector) , mismatch_counter_ (collector->make_counter ("ledger.history", "mismatch")) , m_ledgers_by_hash ("LedgerCache", CACHED_LEDGER_NUM, CACHED_LEDGER_AGE, get_seconds_clock (), deprecatedLogs().journal("TaggedCache")) , m_consensus_validated ("ConsensusValidated", 64, 300, get_seconds_clock (), deprecatedLogs().journal("TaggedCache")) { }
InboundLedgersImp (Application& app, clock_type& clock, Stoppable& parent, beast::insight::Collector::ptr const& collector) : Stoppable ("InboundLedgers", parent) , app_ (app) , fetchRate_(clock.now()) , j_ (app.journal ("InboundLedger")) , m_clock (clock) , mRecentFailures (clock) , mCounter(collector->make_counter("ledger_fetches")) { }