From c57d327a1ec1beaf4fdbbf652be6380871d7fa4e Mon Sep 17 00:00:00 2001 From: "everywhere.z" Date: Fri, 27 Sep 2024 00:25:42 +0800 Subject: [PATCH] =?UTF-8?q?feature=20#IASS9Z=20=E6=96=B0=E7=9A=84java?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E6=8F=92=E4=BB=B6=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?java8~java17=E7=9A=84=E6=89=80=E6=9C=89=E8=AF=AD=E6=B3=95?= =?UTF-8?q?=E7=89=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yomahub/liteflow/benchmark/ScriptJavaxBenchmark.java | 9 +++++---- .../src/test/resources/application.properties | 2 +- pom.xml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/liteflow-benchmark/liteflow-benchmark-script-javax/src/test/java/com/yomahub/liteflow/benchmark/ScriptJavaxBenchmark.java b/liteflow-benchmark/liteflow-benchmark-script-javax/src/test/java/com/yomahub/liteflow/benchmark/ScriptJavaxBenchmark.java index 761d21597..209feaf6d 100644 --- a/liteflow-benchmark/liteflow-benchmark-script-javax/src/test/java/com/yomahub/liteflow/benchmark/ScriptJavaxBenchmark.java +++ b/liteflow-benchmark/liteflow-benchmark-script-javax/src/test/java/com/yomahub/liteflow/benchmark/ScriptJavaxBenchmark.java @@ -42,12 +42,13 @@ public class ScriptJavaxBenchmark { applicationContext.close(); } - /*@Benchmark + //普通执行 + @Benchmark public void test1(){ flowExecutor.execute2Resp("chain1"); - }*/ + } - //每次编译一样的的script性能 + //LF动态创建组件和规则,并执行 @Benchmark public void test2(){ String scriptContent = ResourceUtil.readUtf8Str("classpath:javaxScript.java"); @@ -66,7 +67,7 @@ public class ScriptJavaxBenchmark { .mode(Mode.Throughput) .warmupIterations(1)//预热次数 .measurementIterations(3)//执行次数 - .measurementTime(new TimeValue(30, TimeUnit.SECONDS))//每次执行多少时间 + .measurementTime(new TimeValue(10, TimeUnit.SECONDS))//每次执行多少时间 .threads(300)//多少个线程 .forks(1)//多少个进程 .timeUnit(TimeUnit.SECONDS) diff --git a/liteflow-benchmark/liteflow-benchmark-script-javax/src/test/resources/application.properties b/liteflow-benchmark/liteflow-benchmark-script-javax/src/test/resources/application.properties index 554d385f9..970b6d155 100644 --- a/liteflow-benchmark/liteflow-benchmark-script-javax/src/test/resources/application.properties +++ b/liteflow-benchmark/liteflow-benchmark-script-javax/src/test/resources/application.properties @@ -1,3 +1,3 @@ liteflow.rule-source=flow.xml -liteflow.print-execution-log=true +liteflow.print-execution-log=false liteflow.script-setting.javax-is-cache=false \ No newline at end of file diff --git a/pom.xml b/pom.xml index b7b108f64..ee8c90939 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ 3.21.0 3.1.12 1.9.23 - 1.3.5-SNAPSHOT + 1.3.6