From 0a1df44daf9dc3be16b73f489d63752379f749b7 Mon Sep 17 00:00:00 2001 From: Steven Barclay Date: Sat, 9 Mar 2024 21:18:24 +0800 Subject: [PATCH] Add debug perf logging to BondRepository.update() This is in anticipation of speedups we wish to make, as JProfiler reveals it to be a hotspot during new block arrivals (which are tricky to profile, as they occur at random). --- .../main/java/bisq/core/dao/governance/bond/BondRepository.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/bisq/core/dao/governance/bond/BondRepository.java b/core/src/main/java/bisq/core/dao/governance/bond/BondRepository.java index 3e486cde14..b329f5ba76 100644 --- a/core/src/main/java/bisq/core/dao/governance/bond/BondRepository.java +++ b/core/src/main/java/bisq/core/dao/governance/bond/BondRepository.java @@ -213,6 +213,7 @@ public abstract class BondRepository, T extends BondedAsset> i protected abstract Stream getBondedAssetStream(); protected void update() { + long ts = System.currentTimeMillis(); log.debug("update"); getBondedAssetStream().forEach(bondedAsset -> { String uid = bondedAsset.getUid(); @@ -226,6 +227,7 @@ public abstract class BondRepository, T extends BondedAsset> i updateBondStateFromUnconfirmedUnlockTxs(); bonds.setAll(bondByUidMap.values()); + log.debug("update took {} ms", System.currentTimeMillis() - ts); }