Function to get load factors in machine understandable form.

This commit is contained in:
JoelKatz
2012-12-27 10:41:10 -08:00
parent 22973c1e5b
commit c09133fb6d
2 changed files with 9 additions and 0 deletions

View File

@@ -187,6 +187,12 @@ uint32 LoadFeeTrack::getLocalFee()
return mLocalTxnLoadFee; return mLocalTxnLoadFee;
} }
uint32 LoadFeeTrack::getLoadFactor()
{
boost::mutex::scoped_lock sl(mLock);
return std::max(mLocalTxnLoadFee, mRemoteTxnLoadFee);
}
void LoadFeeTrack::setRemoteFee(uint32 f) void LoadFeeTrack::setRemoteFee(uint32 f)
{ {
boost::mutex::scoped_lock sl(mLock); boost::mutex::scoped_lock sl(mLock);

View File

@@ -144,6 +144,9 @@ public:
uint32 getRemoteFee(); uint32 getRemoteFee();
uint32 getLocalFee(); uint32 getLocalFee();
uint32 getLoadBase() { return lftNormalFee; }
uint32 getLoadFactor();
Json::Value getJson(uint64 baseFee, uint32 referenceFeeUnits); Json::Value getJson(uint64 baseFee, uint32 referenceFeeUnits);
void setRemoteFee(uint32); void setRemoteFee(uint32);