From ce543415f0cad7ebb3dfa6b797c63dccd6fa44d7 Mon Sep 17 00:00:00 2001 From: Faker <15641483049@163.com> Date: Tue, 12 Dec 2023 08:17:52 +0000 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20hutool-c?= =?UTF-8?q?ore/src/test/java/org/dromara/hutool/core/date/CodeWatchUtilTes?= =?UTF-8?q?t.java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hutool/core/date/CodeWatchUtilTest.java | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 hutool-core/src/test/java/org/dromara/hutool/core/date/CodeWatchUtilTest.java diff --git a/hutool-core/src/test/java/org/dromara/hutool/core/date/CodeWatchUtilTest.java b/hutool-core/src/test/java/org/dromara/hutool/core/date/CodeWatchUtilTest.java deleted file mode 100644 index 0102f8d02..000000000 --- a/hutool-core/src/test/java/org/dromara/hutool/core/date/CodeWatchUtilTest.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.dromara.hutool.core.date; - -import org.dromara.hutool.core.lang.Console; -import org.junit.jupiter.api.Test; - -import java.util.concurrent.TimeUnit; - -/** - * @author: liufuqiang - * @date: 2023-12-11 17:04 - */ -public class CodeWatchUtilTest { - - @Test - public void printDefault() throws InterruptedException { - CodeWatchUtil.init("任务id"); - - // 任务1 - CodeWatchUtil.start("任务一"); - Thread.sleep(1000); - - // 任务2 - CodeWatchUtil.start("任务二"); - Thread.sleep(2000); - Console.log(CodeWatchUtil.printCurrentTask()); - - - // 打印出耗时 - Console.log(CodeWatchUtil.prettyPrint()); - } - - @Test - public void printUnit() throws InterruptedException { - CodeWatchUtil.init("任务id"); - method01(); - method02(); - Console.log(CodeWatchUtil.prettyPrint(TimeUnit.MILLISECONDS)); - } - - private static void method01() throws InterruptedException { - CodeWatchUtil.start("方法一"); - Thread.sleep(1000); - } - - private static void method02() throws InterruptedException { - CodeWatchUtil.start("方法二"); - Thread.sleep(2000); - CodeWatchUtil.stop(); - Console.log(CodeWatchUtil.printCurrentTask(TimeUnit.MILLISECONDS)); - } -}