mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Cleanup.
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
#include "LoadManager.h"
|
#include "LoadManager.h"
|
||||||
|
|
||||||
LoadManager::LoadManager(int creditRate, int creditLimit, int debitWarn, int debitLimit) :
|
LoadManager::LoadManager(int creditRate, int creditLimit, int debitWarn, int debitLimit) :
|
||||||
mCreditRate(creditRate), mCreditLimit(creditLimit), mDebitWarn(debitWarn), mDebitLimit(debitLimit), mCosts(LT_MAX)
|
mCreditRate(creditRate), mCreditLimit(creditLimit), mDebitWarn(debitWarn), mDebitLimit(debitLimit),
|
||||||
|
mCosts(LT_MAX)
|
||||||
{
|
{
|
||||||
addLoadCost(LoadCost(LT_InvalidRequest, 10, LC_CPU | LC_Network));
|
addLoadCost(LoadCost(LT_InvalidRequest, 10, LC_CPU | LC_Network));
|
||||||
addLoadCost(LoadCost(LT_RequestNoReply, 1, LC_CPU | LC_Disk));
|
addLoadCost(LoadCost(LT_RequestNoReply, 1, LC_CPU | LC_Disk));
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ enum LoadType
|
|||||||
LT_RequestData, // A request that is hard to satisfy, disk access
|
LT_RequestData, // A request that is hard to satisfy, disk access
|
||||||
LT_CheapQuery, // A query that is trivial, cached data
|
LT_CheapQuery, // A query that is trivial, cached data
|
||||||
|
|
||||||
LT_MAX = LT_CheapQuery
|
LT_MAX // MUST BE LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
// load categoryies
|
// load categories
|
||||||
static const int LC_Disk = 1;
|
static const int LC_Disk = 1;
|
||||||
static const int LC_CPU = 2;
|
static const int LC_CPU = 2;
|
||||||
static const int LC_Network = 4;
|
static const int LC_Network = 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user