Skip to content

Commit

Permalink
Merge bitcoin#23072: log: Remove unnecessary timing of Callbacks bench
Browse files Browse the repository at this point in the history
ab27800 log: Remove unnecessary timing logs for Callbacks bench (Douglas Chimento)

Pull request description:

  Logging of Callbacks are no longer needed and records times that are not relevant for performance analysis.
  resolves bitcoin#23071

ACKs for top commit:
  laanwj:
    Thanks. re-ACK ab27800
  jonatack:
    Code review ACK ab27800

Tree-SHA512: be1ea780c4db9407a8799065a8824b9d3610abac72af5907809ed62d493d5a54e65735de45ec5fdd0edb85ef21ec6036105abe8ca00093942980f6f92e7fec50
  • Loading branch information
merge-script authored and vijaydasmp committed Sep 6, 2024
1 parent 8c106bb commit d726aea
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,6 @@ static int64_t nTimeDashSpecific = 0;
static int64_t nTimeConnect = 0;
static int64_t nTimeIndexConnect = 0;
static int64_t nTimeIndexWrite = 0;
static int64_t nTimeCallbacks = 0;
static int64_t nTimeTotal = 0;
static int64_t nBlocksTotal = 0;

Expand Down Expand Up @@ -2293,10 +2292,6 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
uiInterface.NotifyMasternodeListChanged(mnlu.new_list, pindex);
}

int64_t nTime8 = GetTimeMicros(); nTimeCallbacks += nTime8 - nTime5;
LogPrint(BCLog::BENCHMARK, " - Callbacks: %.2fms [%.2fs (%.2fms/blk)]\n", MILLI * (nTime8 - nTime5), nTimeCallbacks * MICRO, nTimeCallbacks * MILLI / nBlocksTotal);

statsClient.timing("ConnectBlock_ms", (nTime8 - nTimeStart) / 1000, 1.0f);
statsClient.gauge("blocks.tip.SizeBytes", ::GetSerializeSize(block, PROTOCOL_VERSION), 1.0f);
statsClient.gauge("blocks.tip.Height", m_chain.Height(), 1.0f);
statsClient.gauge("blocks.tip.Version", block.nVersion, 1.0f);
Expand Down

0 comments on commit d726aea

Please sign in to comment.