From bb0f9d95c0486dd7ae6e0e2d697878d2bf448769 Mon Sep 17 00:00:00 2001 From: Li Yu Heng Date: Wed, 13 Dec 2023 15:26:43 +0800 Subject: [PATCH] Fix processing display problem (#383) --- .../java/cn/edu/tsinghua/iot/benchmark/client/DataClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/client/DataClient.java b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/client/DataClient.java index df17b7f03..9dbf7a828 100644 --- a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/client/DataClient.java +++ b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/client/DataClient.java @@ -135,7 +135,7 @@ public void run() { // print current progress periodically service.scheduleAtFixedRate( () -> { - String percent = String.format("%.2f", (loopIndex + 1) * 100.0D / this.totalLoop); + String percent = String.format("%.2f", loopIndex * 100.0D / this.totalLoop); LOGGER.info("{} {}% workload is done.", currentThread, percent); }, 1,