mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 07:25:51 +00:00
Monitor LevelDB performance.
This commit is contained in:
@@ -50,6 +50,8 @@ bool HashedObjectStore::store(HashedObjectType type, uint32 index,
|
||||
HashedObject::pointer object = boost::make_shared<HashedObject>(type, index, data, hash);
|
||||
if (!mCache.canonicalize(hash, object))
|
||||
{
|
||||
LoadEvent::autoptr event(theApp->getJobQueue().getLoadEventAP(jtHO_WRITE, "HOS::store"));
|
||||
|
||||
std::vector<unsigned char> rawData(9 + data.size());
|
||||
unsigned char* bufPtr = &rawData.front();
|
||||
|
||||
@@ -88,6 +90,7 @@ HashedObject::pointer HashedObjectStore::retrieve(const uint256& hash)
|
||||
return obj;
|
||||
}
|
||||
|
||||
LoadEvent::autoptr event(theApp->getJobQueue().getLoadEventAP(jtHO_READ, "HOS::retrieve"));
|
||||
std::string sData;
|
||||
leveldb::Status st = theApp->getHashNodeDB()->Get(leveldb::ReadOptions(),
|
||||
leveldb::Slice(reinterpret_cast<const char *>(hash.begin()), hash.size()), &sData);
|
||||
|
||||
@@ -60,6 +60,8 @@ const char* Job::toString(JobType t)
|
||||
case jtTXN_PROC: return "processTransaction";
|
||||
case jtOB_SETUP: return "orderBookSetup";
|
||||
case jtPATH_FIND: return "pathFind";
|
||||
case jtHO_READ: return "nodeRead";
|
||||
case jtHO_WRITE: return "nodeWrite";
|
||||
default: assert(false); return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,9 +45,11 @@ enum JobType
|
||||
jtACCEPTLEDGER = 26,
|
||||
jtTXN_PROC = 27,
|
||||
jtOB_SETUP = 28,
|
||||
jtPATH_FIND = 29
|
||||
jtPATH_FIND = 29,
|
||||
jtHO_READ = 30,
|
||||
jtHO_WRITE = 31,
|
||||
}; // CAUTION: If you add new types, add them to JobType.cpp too
|
||||
#define NUM_JOB_TYPES 32
|
||||
#define NUM_JOB_TYPES 48
|
||||
|
||||
class Job
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user