diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-10-10 20:47:52 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-10-10 21:24:21 +0100 |
commit | 4038e86527770ef22a60b2aadeeaa87120197082 (patch) | |
tree | cb55eb7c37052fd5b78593b1552c79c12b0be2ed /src/cryptonote_core | |
parent | perf_timer: new class and macros to make performance logs easier (diff) | |
download | monero-4038e86527770ef22a60b2aadeeaa87120197082.tar.xz |
Add performance timers for ringct tx verification
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 3 | ||||
-rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 83290796b..9d2bf9332 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -52,6 +52,7 @@ #include "cryptonote_core/checkpoints.h" #include "cryptonote_core/cryptonote_core.h" #include "ringct/rctSigs.h" +#include "common/perf_timer.h" #if defined(PER_BLOCK_CHECKPOINT) #include "blocks/blocks.h" #endif @@ -2245,6 +2246,7 @@ bool Blockchain::have_tx_keyimges_as_spent(const transaction &tx) const } bool Blockchain::expand_transaction_2(transaction &tx, const crypto::hash &tx_prefix_hash, const std::vector<std::vector<rct::ctkey>> &pubkeys) { + PERF_TIMER(expand_transaction_2); CHECK_AND_ASSERT_MES(tx.version == 2, false, "Transaction version is not 2"); rct::rctSig &rv = tx.rct_signatures; @@ -2321,6 +2323,7 @@ bool Blockchain::expand_transaction_2(transaction &tx, const crypto::hash &tx_pr // using threads, etc.) bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, uint64_t* pmax_used_block_height) { + PERF_TIMER(check_tx_inputs); LOG_PRINT_L3("Blockchain::" << __func__); size_t sig_index = 0; if(pmax_used_block_height) diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index 5bfa7eca6..178cbda3c 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -42,6 +42,7 @@ #include "common/int-util.h" #include "misc_language.h" #include "warnings.h" +#include "common/perf_timer.h" #include "crypto/hash.h" DISABLE_VS_WARNINGS(4244 4345 4503) //'boost::foreach_detail_::or_' : decorated name length exceeded, name was truncated @@ -78,6 +79,7 @@ namespace cryptonote //--------------------------------------------------------------------------------- bool tx_memory_pool::add_tx(const transaction &tx, /*const crypto::hash& tx_prefix_hash,*/ const crypto::hash &id, size_t blob_size, tx_verification_context& tvc, bool kept_by_block, bool relayed, uint8_t version) { + PERF_TIMER(add_tx); if (tx.version == 0) { // v0 never accepted |