From 54b0346213e6b0443fcd261eb941eedb27a9a4dc Mon Sep 17 00:00:00 2001 From: Hishida Masato Date: Tue, 13 Aug 2024 20:23:39 +0900 Subject: [PATCH] chore: comment out LOG for streamInsert() --- .../online/periodic/BenchPeriodicUpdateStockTask.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/java/cost-accounting-benchmark/src/main/java/com/tsurugidb/benchmark/costaccounting/online/periodic/BenchPeriodicUpdateStockTask.java b/java/cost-accounting-benchmark/src/main/java/com/tsurugidb/benchmark/costaccounting/online/periodic/BenchPeriodicUpdateStockTask.java index a34cb8c..a77cdc0 100755 --- a/java/cost-accounting-benchmark/src/main/java/com/tsurugidb/benchmark/costaccounting/online/periodic/BenchPeriodicUpdateStockTask.java +++ b/java/cost-accounting-benchmark/src/main/java/com/tsurugidb/benchmark/costaccounting/online/periodic/BenchPeriodicUpdateStockTask.java @@ -9,7 +9,6 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; -import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Stream; import org.slf4j.Logger; @@ -162,7 +161,7 @@ private void executeAllInTransaction() { } private void streamInsert(Stream stream, LocalDateTime now) { - var count = new AtomicInteger(0); + // var count = new AtomicInteger(0); var dao = dbManager.getStockHistoryDao(); final int batchSize = 10000; var list = new ArrayList(batchSize); @@ -178,15 +177,15 @@ private void streamInsert(Stream stream, LocalDateTime now) { list.add(entity); if (list.size() >= batchSize) { dao.insertBatch(list); - count.addAndGet(list.size()); - LOG.info("streamInsert() inserted {}", count.get()); +// count.addAndGet(list.size()); +// LOG.info("streamInsert() inserted {}", count.get()); list.clear(); } }); if (!list.isEmpty()) { dao.insertBatch(list); - count.addAndGet(list.size()); - LOG.info("streamInsert() inserted {}", count.get()); +// count.addAndGet(list.size()); +// LOG.info("streamInsert() inserted {}", count.get()); } }