mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Rework the way load is accounted to be more accurate and more specific.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#include "LoadMonitor.h"
|
||||
#include "Log.h"
|
||||
|
||||
SETUP_LOG();
|
||||
|
||||
void LoadMonitor::update()
|
||||
{ // call with the mutex
|
||||
@@ -52,8 +55,10 @@ void LoadMonitor::addLatency(int latency)
|
||||
mLatencyMSPeak = lp;
|
||||
}
|
||||
|
||||
void LoadMonitor::addCountAndLatency(int counts, int latency)
|
||||
void LoadMonitor::addCountAndLatency(const std::string& name, int counts, int latency)
|
||||
{
|
||||
if (latency > 1000)
|
||||
cLog(lsWARNING) << "Job: " << name << " Latency: " << latency;
|
||||
if (latency == 1)
|
||||
latency = 0;
|
||||
boost::mutex::scoped_lock sl(mLock);
|
||||
|
||||
Reference in New Issue
Block a user