mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Access Journal::Stream using member functions (RIPD-1087):
Replace Journal public data members with member function accessors in order to make Journal lighter weight. The change makes a Journal cheaper to pass by value. Also add missing stream checks (e.g., calls to JLOG) to avoid text processing that ultimately will not be stored in the log.
This commit is contained in:
@@ -166,7 +166,7 @@ JobQueue::getJobCountGE (JobType t) const
|
||||
void
|
||||
JobQueue::shutdown ()
|
||||
{
|
||||
JLOG(m_journal.info) << "Job queue shutting down";
|
||||
JLOG(m_journal.info()) << "Job queue shutting down";
|
||||
|
||||
m_workers.pauseAllThreadsAndWait ();
|
||||
}
|
||||
@@ -183,7 +183,7 @@ JobQueue::setThreadCount (int c, bool const standaloneMode)
|
||||
c = static_cast<int>(std::thread::hardware_concurrency());
|
||||
c = 2 + std::min (c, 4); // I/O will bottleneck
|
||||
|
||||
JLOG(m_journal.info) << "Auto-tuning to " << c <<
|
||||
JLOG(m_journal.info()) << "Auto-tuning to " << c <<
|
||||
" validation/transaction/proposal threads";
|
||||
}
|
||||
|
||||
@@ -463,7 +463,7 @@ JobQueue::processTask ()
|
||||
type = job.getType();
|
||||
JobTypeData& data(getJobTypeData(type));
|
||||
beast::Thread::setCurrentThreadName (data.name ());
|
||||
JLOG(m_journal.trace) << "Doing " << data.name () << " job";
|
||||
JLOG(m_journal.trace()) << "Doing " << data.name () << " job";
|
||||
on_dequeue (job.getType (), start_time - job.queue_time ());
|
||||
job.doJob ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user