From 83c43cb8dfcfffcbe43b57207de9cfe5692203a2 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Wed, 22 Jun 2022 00:45:55 -0400 Subject: [PATCH] minor logging progress --- .../src/main/java/com/opensr5/ConfigurationImage.java | 8 ++++++++ .../java/com/rusefi/binaryprotocol/test/PCanSandbox.java | 3 ++- .../com/rusefi/binaryprotocol/test/SandboxCommon.java | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/java_console/inifile/src/main/java/com/opensr5/ConfigurationImage.java b/java_console/inifile/src/main/java/com/opensr5/ConfigurationImage.java index 295088c85a..c7a078d374 100644 --- a/java_console/inifile/src/main/java/com/opensr5/ConfigurationImage.java +++ b/java_console/inifile/src/main/java/com/opensr5/ConfigurationImage.java @@ -4,6 +4,7 @@ import com.rusefi.shared.FileUtil; import org.jetbrains.annotations.NotNull; import java.nio.ByteBuffer; +import java.util.Arrays; /** * Andrey Belomutskiy, (c) 2013-2020 @@ -62,4 +63,11 @@ public class ConfigurationImage { System.arraycopy(content, offset, r, 0, size); return r; } + + @Override + public String toString() { + return "ConfigurationImage{" + + "size=" + content.length + + '}'; + } } diff --git a/java_console/io/src/test/java/com/rusefi/binaryprotocol/test/PCanSandbox.java b/java_console/io/src/test/java/com/rusefi/binaryprotocol/test/PCanSandbox.java index 8446eb8b27..92a1f28224 100644 --- a/java_console/io/src/test/java/com/rusefi/binaryprotocol/test/PCanSandbox.java +++ b/java_console/io/src/test/java/com/rusefi/binaryprotocol/test/PCanSandbox.java @@ -47,8 +47,9 @@ public class PCanSandbox { log.info("requestOutputChannels " + response); }); + long start = System.currentTimeMillis(); ConfigurationImage ci = SandboxCommon.readImage(tsStream, linkManager); - log.info("Got ConfigurationImage " + ci); + log.info("Got ConfigurationImage " + ci + " in " + (System.currentTimeMillis() - start) + "ms"); Thread.sleep(5 * SECOND); diff --git a/java_console/io/src/test/java/com/rusefi/binaryprotocol/test/SandboxCommon.java b/java_console/io/src/test/java/com/rusefi/binaryprotocol/test/SandboxCommon.java index 20c45f1b88..56fb6b8169 100644 --- a/java_console/io/src/test/java/com/rusefi/binaryprotocol/test/SandboxCommon.java +++ b/java_console/io/src/test/java/com/rusefi/binaryprotocol/test/SandboxCommon.java @@ -55,7 +55,7 @@ public class SandboxCommon { imageLatch.await(1, TimeUnit.MINUTES); ConfigurationImage ci = configurationImageAtomicReference.get(); - log.info("Got ConfigurationImage " + ci + ", " + ci.getSize()); + log.info("Got ConfigurationImage " + ci + ", size=" + ci.getSize()); return ci; }