diff options
author | warptangent <warptangent@inbox.com> | 2015-02-11 15:55:53 -0800 |
---|---|---|
committer | warptangent <warptangent@inbox.com> | 2015-02-23 00:33:37 -0800 |
commit | 3676ac5841b1e433830323b3c51bf78e96947054 (patch) | |
tree | c484b4e00231247a0c0e34f270a2da085e4a1ad9 /src/cryptonote_core/blockchain_db.h | |
parent | Move LMDB storage to subfolder (diff) | |
download | monero-3676ac5841b1e433830323b3c51bf78e96947054.tar.xz |
Add profiling to block and tx processing
Diffstat (limited to 'src/cryptonote_core/blockchain_db.h')
-rw-r--r-- | src/cryptonote_core/blockchain_db.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain_db.h b/src/cryptonote_core/blockchain_db.h index db56c7c07..531de04bd 100644 --- a/src/cryptonote_core/blockchain_db.h +++ b/src/cryptonote_core/blockchain_db.h @@ -301,12 +301,22 @@ private: // helper function to remove transaction from blockchain void remove_transaction(const crypto::hash& tx_hash); + uint64_t num_calls = 0; + uint64_t time_blk_hash = 0; + uint64_t time_add_block1 = 0; + uint64_t time_add_transaction = 0; + public: // virtual dtor virtual ~BlockchainDB() { }; + // reset profiling stats + void reset_stats(); + + // show profiling stats + void show_stats(); // open the db at location <filename>, or create it if there isn't one. virtual void open(const std::string& filename) = 0; |