@@ -34,7 +34,6 @@ class LedgerPostgresDataHandler @Inject() (
34
34
block : Block ,
35
35
transactions : List [Transaction ]): ApplicationResult [Unit ] = {
36
36
37
- val start = System .currentTimeMillis()
38
37
val result = withTransaction { implicit conn =>
39
38
val result = for {
40
39
_ <- upsertBlockCascade(block.copy(nextBlockhash = None ), transactions)
@@ -51,8 +50,6 @@ class LedgerPostgresDataHandler @Inject() (
51
50
case _ => e
52
51
}
53
52
54
- val took = System .currentTimeMillis() - start
55
- logger.info(s " Pushing block = ${block.hash}, took $took ms " )
56
53
result.badMap { _.map(fromError) }
57
54
}
58
55
@@ -119,13 +116,7 @@ class LedgerPostgresDataHandler @Inject() (
119
116
}
120
117
121
118
private def insertBalanceBatch (balanceList : Iterable [Balance ])(implicit conn : Connection ) = {
122
- val start = System .currentTimeMillis()
123
- val result = balanceList.map { b => balancePostgresDAO.upsert(b) }
124
-
125
- val took = System .currentTimeMillis() - start
126
- logger.info(s " Inserting balance batch, size = ${balanceList.size}, took = $took ms " )
127
-
128
- result
119
+ balanceList.map { b => balancePostgresDAO.upsert(b) }
129
120
}
130
121
131
122
private def spendMap (transactions : List [Transaction ]): Map [Address , BigDecimal ] = {
@@ -151,7 +142,6 @@ class LedgerPostgresDataHandler @Inject() (
151
142
}
152
143
153
144
private def balances (transactions : List [Transaction ]) = {
154
- val start = System .currentTimeMillis()
155
145
val spentList = spendMap(transactions).map { case (address, spent) =>
156
146
Balance (address, spent = spent)
157
147
}
@@ -165,8 +155,6 @@ class LedgerPostgresDataHandler @Inject() (
165
155
.mapValues { _.reduce(mergeBalances) }
166
156
.values
167
157
168
- val took = System .currentTimeMillis() - start
169
- logger.info(s " Computing balances for transaction batch, size = ${transactions.size}, took = $took ms " )
170
158
result
171
159
}
172
160
0 commit comments