aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp
diff options
context:
space:
mode:
authorwarptangent <warptangent@inbox.com>2015-02-10 20:01:02 -0800
committerwarptangent <warptangent@inbox.com>2015-02-23 00:33:39 -0800
commit6485dacc2fcaab7eb6db63c46716ffdfa0c568c4 (patch)
treea64104230bd0d8ddfac59d119de7fd36dc4f48e6 /src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp
parentBlockchainLMDB: Add batch transaction support to tx_exists() (diff)
downloadmonero-6485dacc2fcaab7eb6db63c46716ffdfa0c568c4.tar.xz
BlockchainLMDB: Add profiling to tx_exists()
Diffstat (limited to 'src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp')
-rw-r--r--src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp b/src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp
index 4e9f6cb28..a09d9331c 100644
--- a/src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp
+++ b/src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp
@@ -1126,7 +1126,6 @@ uint64_t BlockchainLMDB::height() const
return m_height;
}
-
bool BlockchainLMDB::tx_exists(const crypto::hash& h) const
{
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
@@ -1144,7 +1143,11 @@ bool BlockchainLMDB::tx_exists(const crypto::hash& h) const
MDB_val_copy<crypto::hash> key(h);
MDB_val result;
+
+ TIME_MEASURE_START(time1);
auto get_result = mdb_get(*txn_ptr, m_txs, &key, &result);
+ TIME_MEASURE_FINISH(time1);
+ time_tx_exists += time1;
if (get_result == MDB_NOTFOUND)
{
if (! m_batch_active)