Add counters to track nodestore read and write activities.

This commit is contained in:
Mark Travis
2014-09-27 17:18:58 -07:00
committed by Vinnie Falco
parent c0b69e8ef7
commit ec4ec48fb8
3 changed files with 72 additions and 0 deletions

View File

@@ -85,6 +85,12 @@ Json::Value doGetCounts (RPC::Context& context)
textTime (uptime, s, "minute", 60);
textTime (uptime, s, "second", 1);
ret["uptime"] = uptime;
ret["node_writes"] = app.getNodeStore().getStoreCount();
ret["node_reads_total"] = app.getNodeStore().getFetchTotalCount();
ret["node_reads_hit"] = app.getNodeStore().getFetchHitCount();
ret["node_written_bytes"] = app.getNodeStore().getStoreSize();
ret["node_read_bytes"] = app.getNodeStore().getFetchSize();
return ret;
}