Exemple #1
0
 InboundLedgersImp (clock_type& clock, Stoppable& parent,
                    beast::insight::Collector::ptr const& collector)
     : Stoppable ("InboundLedgers", parent)
     , fetchRate_(clock.now())
     , m_clock (clock)
     , mRecentFailures ("LedgerAcquireRecentFailures",
         clock, 0, kReacquireIntervalSeconds)
     , mCounter(collector->make_counter("ledger_fetches"))
 {
 }
		size_t	mark(const std::string& label)
		{
			time_point_type tp=clock_.now();
			if(label.length()==0){
				std::string	lb=boost::lexical_cast<std::string>(check_points_.size());
				check_points_.push_back(label_and_time_point(lb,tp));
			}else{
				check_points_.push_back(label_and_time_point(label,tp));
			}
			return check_points_.size();
		}
 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"))
 {
 }