mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +00:00
Track special disk accesses.
This commit is contained in:
@@ -60,6 +60,7 @@ void HashedObjectStore::waitWrite()
|
|||||||
|
|
||||||
void HashedObjectStore::bulkWrite()
|
void HashedObjectStore::bulkWrite()
|
||||||
{
|
{
|
||||||
|
LoadEvent::pointer event = theApp->getJobQueue().getLoadEvent(jtDISK);
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
std::vector< boost::shared_ptr<HashedObject> > set;
|
std::vector< boost::shared_ptr<HashedObject> > set;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const char* Job::toString(JobType t)
|
|||||||
case jtDEATH: return "jobOfDeath";
|
case jtDEATH: return "jobOfDeath";
|
||||||
case jtCLIENT: return "clientCommand";
|
case jtCLIENT: return "clientCommand";
|
||||||
case jtPEER: return "peerCommand";
|
case jtPEER: return "peerCommand";
|
||||||
|
case jtDISK: return "diskAccess";
|
||||||
default: assert(false); return "unknown";
|
default: assert(false); return "unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ enum JobType
|
|||||||
// special types not dispatched by the job pool
|
// special types not dispatched by the job pool
|
||||||
jtCLIENT = 10,
|
jtCLIENT = 10,
|
||||||
jtPEER = 11,
|
jtPEER = 11,
|
||||||
|
jtDISK = 12,
|
||||||
};
|
};
|
||||||
#define NUM_JOB_TYPES 16
|
#define NUM_JOB_TYPES 16
|
||||||
|
|
||||||
|
|||||||
@@ -341,6 +341,7 @@ uint256 Ledger::getHash()
|
|||||||
|
|
||||||
void Ledger::saveAcceptedLedger(bool fromConsensus)
|
void Ledger::saveAcceptedLedger(bool fromConsensus)
|
||||||
{ // can be called in a different thread
|
{ // can be called in a different thread
|
||||||
|
LoadEvent::pointer event = theApp->getJobQueue().getLoadEvent(jtDISK);
|
||||||
cLog(lsTRACE) << "saveAcceptedLedger " << (fromConsensus ? "fromConsensus " : "fromAcquire ") << getLedgerSeq();
|
cLog(lsTRACE) << "saveAcceptedLedger " << (fromConsensus ? "fromConsensus " : "fromAcquire ") << getLedgerSeq();
|
||||||
static boost::format ledgerExists("SELECT LedgerSeq FROM Ledgers where LedgerSeq = %d;");
|
static boost::format ledgerExists("SELECT LedgerSeq FROM Ledgers where LedgerSeq = %d;");
|
||||||
static boost::format deleteLedger("DELETE FROM Ledgers WHERE LedgerSeq = %d;");
|
static boost::format deleteLedger("DELETE FROM Ledgers WHERE LedgerSeq = %d;");
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ void ValidationCollection::condWrite()
|
|||||||
|
|
||||||
void ValidationCollection::doWrite()
|
void ValidationCollection::doWrite()
|
||||||
{
|
{
|
||||||
|
LoadEvent::pointer event = theApp->getJobQueue().getLoadEvent(jtDISK);
|
||||||
static boost::format insVal("INSERT INTO LedgerValidations "
|
static boost::format insVal("INSERT INTO LedgerValidations "
|
||||||
"(LedgerHash,NodePubKey,Flags,SignTime,Signature) VALUES ('%s','%s','%u','%u',%s);");
|
"(LedgerHash,NodePubKey,Flags,SignTime,Signature) VALUES ('%s','%s','%u','%u',%s);");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user