diff --git a/core/src/main/java/bisq/core/dao/monitoring/DaoStateMonitoringService.java b/core/src/main/java/bisq/core/dao/monitoring/DaoStateMonitoringService.java index 3c8b4657773..b3fedc9702d 100644 --- a/core/src/main/java/bisq/core/dao/monitoring/DaoStateMonitoringService.java +++ b/core/src/main/java/bisq/core/dao/monitoring/DaoStateMonitoringService.java @@ -203,7 +203,7 @@ public void onParseBlockChainComplete() { verifyCheckpoints(); } - log.info("ParseBlockChainComplete: Accumulated updateHashChain() calls for {} block took {} ms " + + log.info("ParseBlockChainComplete: Accumulated updateHashChain() calls for {} blocks took {} ms " + "({} ms in average / block)", numCalls, accumulatedDuration, @@ -370,12 +370,19 @@ private Optional createDaoStateBlock(Block block) { UserThread.runAfter(() -> daoStateNetworkService.broadcastMyStateHash(myDaoStateHash), delayInSec); } long duration = System.currentTimeMillis() - ts; - // We don't want to spam the output. We log accumulated time after parsing is completed. log.trace("updateHashChain for block {} took {} ms", block.getHeight(), duration); accumulatedDuration += duration; numCalls++; + + if (numCalls % 10 == 0) { + log.info("Accumulated updateHashChain() calls for {} blocks took {} ms " + + "({} ms in average / block)", + numCalls, + accumulatedDuration, + (int) ((double) accumulatedDuration / (double) numCalls)); + } listeners.forEach(Listener::onDaoStateBlockCreated); return Optional.of(daoStateBlock); } diff --git a/core/src/main/java/bisq/core/dao/monitoring/model/DaoStateHash.java b/core/src/main/java/bisq/core/dao/monitoring/model/DaoStateHash.java index e2a624576cd..a97da52b16e 100644 --- a/core/src/main/java/bisq/core/dao/monitoring/model/DaoStateHash.java +++ b/core/src/main/java/bisq/core/dao/monitoring/model/DaoStateHash.java @@ -26,7 +26,7 @@ @Getter @EqualsAndHashCode(callSuper = true) public final class DaoStateHash extends StateHash { - // If we have built the hash by ourself opposed to that we got delivered the hash from seed nodes or resources + // If we have built the hash by ourselves opposed to that we got delivered the hash from seed nodes or resources private final boolean isSelfCreated; public DaoStateHash(int height, byte[] hash, boolean isSelfCreated) {