mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
tracing: Tracepoint for connected blocks
Can, for example, be used to benchmark block connections.
This commit is contained in:
parent
4224dec22b
commit
8f37f5c2a5
4 changed files with 259 additions and 0 deletions
|
|
@ -48,6 +48,7 @@
|
|||
#include <util/rbf.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/system.h>
|
||||
#include <util/trace.h>
|
||||
#include <util/translation.h>
|
||||
#include <validationinterface.h>
|
||||
#include <warnings.h>
|
||||
|
|
@ -1997,6 +1998,16 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
|
|||
int64_t nTime6 = GetTimeMicros(); nTimeCallbacks += nTime6 - nTime5;
|
||||
LogPrint(BCLog::BENCH, " - Callbacks: %.2fms [%.2fs (%.2fms/blk)]\n", MILLI * (nTime6 - nTime5), nTimeCallbacks * MICRO, nTimeCallbacks * MILLI / nBlocksTotal);
|
||||
|
||||
TRACE7(validation, block_connected,
|
||||
block.GetHash().ToString().c_str(),
|
||||
pindex->nHeight,
|
||||
block.vtx.size(),
|
||||
nInputs,
|
||||
nSigOpsCost,
|
||||
GetTimeMicros() - nTimeStart, // in microseconds (µs)
|
||||
block.GetHash().data()
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue