mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Job queue simplificaiton
This commit is contained in:
@@ -30,12 +30,12 @@ void LoadMonitor::update()
|
||||
} while (mLastUpdate < now);
|
||||
}
|
||||
|
||||
void LoadMonitor::addCount(int counts)
|
||||
void LoadMonitor::addCount()
|
||||
{
|
||||
boost::mutex::scoped_lock sl(mLock);
|
||||
|
||||
update();
|
||||
mCounts += counts;
|
||||
++mCounts;
|
||||
}
|
||||
|
||||
void LoadMonitor::addLatency(int latency)
|
||||
@@ -55,7 +55,7 @@ void LoadMonitor::addLatency(int latency)
|
||||
mLatencyMSPeak = lp;
|
||||
}
|
||||
|
||||
void LoadMonitor::addCountAndLatency(const std::string& name, int counts, int latency)
|
||||
void LoadMonitor::addCountAndLatency(const std::string& name, int latency)
|
||||
{
|
||||
if (latency > 500)
|
||||
{
|
||||
@@ -63,10 +63,11 @@ void LoadMonitor::addCountAndLatency(const std::string& name, int counts, int la
|
||||
}
|
||||
if (latency == 1)
|
||||
latency = 0;
|
||||
|
||||
boost::mutex::scoped_lock sl(mLock);
|
||||
|
||||
update();
|
||||
mCounts += counts;
|
||||
++mCounts;
|
||||
++mLatencyEvents;
|
||||
mLatencyMSAvg += latency;
|
||||
mLatencyMSPeak += latency;
|
||||
|
||||
Reference in New Issue
Block a user