Enlarge the SQLite database cache intelligently.

This commit is contained in:
JoelKatz
2013-03-19 23:04:47 -07:00
parent d5a2c96907
commit 5494bc3158
8 changed files with 39 additions and 10 deletions

View File

@@ -2021,9 +2021,19 @@ Json::Value RPCHandler::doGetCounts(Json::Value jvRequest, int& cost)
BOOST_FOREACH(InstanceType::InstanceCount& it, count)
ret[it.first] = it.second;
int dbKB = theApp->getLedgerDB()->getDB()->getKBUsed();
int dbKB = theApp->getLedgerDB()->getDB()->getKBUsedAll();
if (dbKB > 0)
ret["dbKB"] = dbKB;
ret["dbKBTotal"] = dbKB;
dbKB = theApp->getLedgerDB()->getDB()->getKBUsedDB();
if (dbKB > 0)
ret["dbKBLedger"] = dbKB;
dbKB = theApp->getHashNodeDB()->getDB()->getKBUsedDB();
if (dbKB > 0)
ret["dbKBHashNode"] = dbKB;
dbKB = theApp->getTxnDB()->getDB()->getKBUsedDB();
if (dbKB > 0)
ret["dbKBTransaction"] = dbKB;
std::string uptime;
int s = upTime();