Skip to content

Commit

Permalink
Merge pull request bitcoin#28 from jlopp/mempoolStats
Browse files Browse the repository at this point in the history
add more mempool stats
  • Loading branch information
jlopp committed Jun 16, 2016
2 parents 9bdb4e1 + ef5cf46 commit 2552cba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,11 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
statsClient.count("transactions.inputs", tx.vin.size(), 1.0f);
statsClient.count("transactions.outputs", tx.vout.size(), 1.0f);

statsClient.gauge("transactions.mempool.totalTransactions", pool.size(), 0.1f);
statsClient.gauge("transactions.mempool.totalTxBytes", (int64_t) pool.GetTotalTxSize(), 0.1f);
statsClient.gauge("transactions.mempool.memoryUsageBytes", (int64_t) pool.DynamicMemoryUsage(), 0.1f);
statsClient.gauge("transactions.mempool.minFeePerKb", pool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK(), 0.1f);

return true;
}

Expand Down

0 comments on commit 2552cba

Please sign in to comment.