From ff1d36f4792ac0d90232f60a2742abaad37ab04c Mon Sep 17 00:00:00 2001 From: "joeylee.lz" Date: Thu, 9 Jun 2022 16:06:23 +0800 Subject: [PATCH] Add FrameworkBenchmarks performance test --- perf/README.md | 4 ++ perf/framework-benchmarks/README.md | 20 ++++++ perf/framework-benchmarks/build.xml | 39 ++++++++++++ perf/framework-benchmarks/playlist.xml | 88 ++++++++++++++++++++++++++ perf/tfb-runner.sh | 19 ++++++ 5 files changed, 170 insertions(+) create mode 100644 perf/framework-benchmarks/README.md create mode 100644 perf/framework-benchmarks/build.xml create mode 100644 perf/framework-benchmarks/playlist.xml create mode 100755 perf/tfb-runner.sh diff --git a/perf/README.md b/perf/README.md index b36c4584b2..f860336c58 100644 --- a/perf/README.md +++ b/perf/README.md @@ -26,6 +26,7 @@ subdirectory and given a meaningful name. Once the reorganization of this direc //├── dacapo //├── renaissance //├── liberty +//├── FrameworkBenchmarks ``` Each subdirectory requires a build.xml file describing where to pull the benchmark suite from, and how to build and run it. Each subdirectory also requires a playlist.xml file which describes 1 or more benchmarks and what commands to run in order to execute a particular benchmark run. @@ -49,4 +50,7 @@ Liberty benchmarks from https://github.com/OpenLiberty - including liberty-dt7-s #### renaissance Renaissance benchmarks from https://github.com/renaissance-benchmarks/renaissance - including renaissance-akka-uct, renaissance-als, renaissance-chi-square, renaissance-db-shootout, renaissance-dec-tree, renaissance-finagle-chirper, renaissance-finagle-http, renaissance-fj-kmeans, renaissance-future-genetic, renaissance-gauss-mix, renaissance-log-regression, renaissance-mnemonics, renaissance-movie-lens, renaissance-naive-bayes, renaissance-par-mnemonics, renaissance-philosophers and renaissance-scala-kmeans +#### FrameworkBenchmarks +FrameworkBenchmarks from https://github.com/TechEmpower/FrameworkBenchmarks - including a wide field of web application frameworks for JAVA. + Additional benchmarks are being reviewed for addition and if you wish to include more, please comment in the open performance benchmarks [issue 1112](https://github.com/adoptium/aqa-tests/issues/1112). diff --git a/perf/framework-benchmarks/README.md b/perf/framework-benchmarks/README.md new file mode 100644 index 0000000000..2ebb42bcde --- /dev/null +++ b/perf/framework-benchmarks/README.md @@ -0,0 +1,20 @@ +# FrameworkBenchmarks + +[FrameworkBenchmarks](https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/Java) provides representative performance measures across a wide field of web application frameworks. With much help from the community, coverage is quite broad and we are happy to broaden it further with contributions. + +Here we focus on the wide range of Java frameworks for web applications scenarios. + +FrameworkBenchmarks covers common workloads as plaintext processing, json content parsing, popular database manipulations +for different frameworks. + +Notice the different from external `netty` tests: +```aidl +external tests runs framework inner unit tests to ensure frameworks behaving correctly. +perf framework tests stresses common worloads to ensure frameworks are performing well under test VMs. +``` + +We are enabling the following list of frameworks to avoid regression: + +| Framework | Workloads | Version | +|-----------|----------------|---------| +| netty | plaintext,json | 11 | diff --git a/perf/framework-benchmarks/build.xml b/perf/framework-benchmarks/build.xml new file mode 100644 index 0000000000..d37e4da350 --- /dev/null +++ b/perf/framework-benchmarks/build.xml @@ -0,0 +1,39 @@ + + + + + Build FrameworkBenchmarks-Test Docker image + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/perf/framework-benchmarks/playlist.xml b/perf/framework-benchmarks/playlist.xml new file mode 100644 index 0000000000..a1f58bf0b9 --- /dev/null +++ b/perf/framework-benchmarks/playlist.xml @@ -0,0 +1,88 @@ + + + + + FrameworkBenchmarks-netty + + ${TEST_RESROOT}/../../../aqa-tests/perf/tfb-runner.sh netty netty.dockerfile ${TEST_RESROOT} + + + special + + + perf + + + + FrameworkBenchmarks-quarkus + + ${TEST_RESROOT}/../../../aqa-tests/perf/tfb-runner.sh quarkus quarkus.dockerfile ${TEST_RESROOT} + + + special + + + perf + + + + FrameworkBenchmarks-spring + + ${TEST_RESROOT}/../../../aqa-tests/perf/tfb-runner.sh spring spring.dockerfile ${TEST_RESROOT} + + + special + + + perf + + + + FrameworkBenchmarks-spark + + ${TEST_RESROOT}/../../../aqa-tests/perf/tfb-runner.sh spark spark.dockerfile ${TEST_RESROOT} + + + special + + + perf + + + + FrameworkBenchmarks-servlet3 + + ${TEST_RESROOT}/../../../aqa-tests/perf/tfb-runner.sh servlet3 servlet3.dockerfile ${TEST_RESROOT} + + + special + + + perf + + + + FrameworkBenchmarks-servlet3 + + ${TEST_RESROOT}/../../../aqa-tests/perf/tfb-runner.sh vertx vertx.dockerfile ${TEST_RESROOT} + + + special + + + perf + + + diff --git a/perf/tfb-runner.sh b/perf/tfb-runner.sh new file mode 100755 index 0000000000..7f4b8e78c6 --- /dev/null +++ b/perf/tfb-runner.sh @@ -0,0 +1,19 @@ +test=$1 +dockerfile=$2 +TEST_RESROOT=$3 + +cd ${TEST_RESROOT} +testcase=` echo ${dockerfile} | cut -d'.' -f 1` +dockerfile=${TEST_RESROOT}/frameworks/Java/${test}/${dockerfile} + +if [ ! -f ${dockerfile} ]; then + echo "Warning: ${dockerfile} not found" + exit 1; +fi + +cp -r ${TEST_JDK_HOME} ${TEST_RESROOT}/frameworks/Java/${test}/jdk +awk '/CMD.*/ && !x {print "COPY jdk /opt/java/openjdk"; x=1} 1' ${dockerfile} > tmpt && mv tmpt ${dockerfile} +awk '/CMD.*/ && !x {print "ENV JAVA_HOME=/opt/java/openjdk"; x=1} 1' ${dockerfile} > tmpt && mv tmpt ${dockerfile} +awk '/CMD.*/ && !x {print "ENV PATH=/opt/java/openjdk/bin:$PATH"; x=1} 1' ${dockerfile} > tmpt && mv tmpt ${dockerfile} +cat ${dockerfile} +./tfb --test $testcase \ No newline at end of file