Skip to content

Commit

Permalink
Add Open Liberty with DayTrader7 (adoptium#1128)
Browse files Browse the repository at this point in the history
Issue: adoptium#1127

Signed-off-by: Piyush Gupta <[email protected]>
  • Loading branch information
piyush286 authored and smlambert committed May 28, 2019
1 parent 43c732b commit 6be989c
Show file tree
Hide file tree
Showing 9 changed files with 3,509 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# misc auto generated folders
bin
!performance/liberty/scripts/bin
test_output_*

# misc auto generated files
Expand Down
104 changes: 104 additions & 0 deletions performance/liberty/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0"?>

<!--
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-->

<project name="Liberty Tests" default="build" basedir=".">
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<description>Liberty Tests</description>

<!-- set global properties for this build -->
<property name="DEST" value="${BUILD_ROOT}/performance/liberty" />

<!--Properties for this particular build-->
<property name="src" location="." />
<property environment="env" />
<property name="BM_BINARIES_URL" value="https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/2019-04-19_0642/openliberty-19.0.0.4.zip" />
<property name="BM_VERSION" value="openliberty-19.0.0.4" />
<basename property="BM_BINARIES_ZIP" file="${BM_BINARIES_URL}"/>

<property name="LIBERTY_APP_URL" value="https://github.com/WASdev/sample.daytrader7/releases/download/v1.2/daytrader-ee7.ear" />
<basename property="LIBERTY_APP" file="${LIBERTY_APP_URL}"/>

<target name="init">
<mkdir dir="${DEST}" />
<mkdir dir="${env.PERF_ROOT}" />
<echo message="BM_BINARIES_ZIP=${BM_BINARIES_ZIP}" />
</target>

<target name="getBinaries" depends="init">
<var name="curl_command" value=""/>
<if>
<available file="${DEST}/libertyBinaries/${BM_VERSION}" />
<then>
<echo message="${DEST}/libertyBinaries/${BM_VERSION} exists." />
</then>
<else>
<echo message="${DEST}/libertyBinaries/${BM_VERSION} doesn't exist." />
<if>
<available file="${env.PERF_ROOT}/${BM_BINARIES_ZIP}" type="file" />
<then>
<echo message="${env.PERF_ROOT}/${BM_BINARIES_ZIP} exists. Hence, not downloading it." />
<unzip src="${env.PERF_ROOT}/${BM_BINARIES_ZIP}" dest="${DEST}/libertyBinaries" />
</then>
<else>
<echo message="${env.PERF_ROOT}/${BM_BINARIES_ZIP} doesn't exist. Hence, downloading it." />
<var name="curl_command" value="-OLks ${BM_BINARIES_URL}"/>
<echo message="curl ${curl_command}" />
<exec executable="curl" failonerror="true">
<arg line="${curl_command}" />
</exec>
<copy file="${BM_BINARIES_ZIP}" todir="${env.PERF_ROOT}"/>
<unzip src="${BM_BINARIES_ZIP}" dest="${DEST}/libertyBinaries" />
</else>
</if>
<echo message="Moving ${DEST}/libertyBinaries/wlp to ${DEST}/libertyBinaries/${BM_VERSION}" />
<move file="${DEST}/libertyBinaries/wlp" tofile="${DEST}/libertyBinaries/${BM_VERSION}"/>
</else>
</if>
<if>
<available file="${DEST}/libertyBinaries/${BM_VERSION}/usr/shared/apps/webcontainer/${LIBERTY_APP}" type="file" />
<then>
<echo message="${DEST}/libertyBinaries/${BM_VERSION}/usr/shared/apps/webcontainer/${LIBERTY_APP} exists. Hence, not downloading it." />
</then>
<else>
<echo message="${DEST}/libertyBinaries/${BM_VERSION}/usr/shared/apps/webcontainer/${LIBERTY_APP} doesn't exist. Hence, downloading it." />
<var name="curl_command" value="-OLks ${LIBERTY_APP_URL}"/>
<echo message="curl ${curl_command}" />
<exec executable="curl" failonerror="true">
<arg line="${curl_command}" />
</exec>
<copy file="${LIBERTY_APP}" todir="${DEST}/libertyBinaries/${BM_VERSION}/usr/shared/apps/webcontainer/"/>
<delete file="${env.PERF_ROOT}/${BM_VERSION}.zip"/>
<move file="${DEST}/libertyBinaries/${BM_VERSION}" tofile="${DEST}/libertyBinaries/wlp"/>
<zip destfile="${env.PERF_ROOT}/${BM_VERSION}.zip" basedir="${DEST}/libertyBinaries"/>
<move file="${DEST}/libertyBinaries/wlp" tofile="${DEST}/libertyBinaries/${BM_VERSION}"/>
</else>
</if>
</target>
<target name="dist" depends="getBinaries" description="generate the distribution">
<copy todir="${DEST}">
<fileset dir="${src}"/>
</copy>
<chmod file="${DEST}/**" perm="a+x"/>
</target>

<target name="clean" depends="dist" description="clean up">
<delete dir="${BM_BINARIES_ZIP}" />
</target>

<target name="build">
<antcall target="clean" inheritall="true" />
</target>
</project>
68 changes: 68 additions & 0 deletions performance/liberty/configs/benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

echo "***** Running Benchmark Script *****"

echo "Current Dir: $(pwd)"

#TODO: Remove these once the use of STAF has been eliminated from all the benchmark scripts
export PATH=/usr/local/staf/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/staf/lib:$LD_LIBRARY_PATH


echo "JDK_VERSION=${JDK_VERSION}"

export JDK="j2sdk-image"
echo "JDK=${JDK}"

export JDK_DIR="${TEST_JDK_HOME}/.."
echo "JDK_DIR=${JDK_DIR}"

######### Generated Script #########

#TODO: Need to do some cleanup and restructure some files for adding other configs
echo ""
echo "********** START OF NEW TESTCI BENCHMARK JOB **********"
echo "Benchmark Name: LibertyStartupDT Benchmark Variant: 17dev-4way-0-256-qs"
echo "Benchmark Product: ${JDK}"
echo ""

#TODO: Need to tune these options. Keeping them simple for now
export JDK_OPTIONS="-Xmx256m"
export COLD="0"
export WARMUP="0"
export NO_SETUP="false"
export SETUP_ONLY="false"
export WARM="1"
export INSTALL_DIR=""
export LIB_PATH=""
export HEALTH_CENTRE=""
export COGNOS_WAIT=""
export REQUEST_CORE=""
export SCENARIO="DayTrader7"
export SERVER_NAME="LibertySUDTServer-$JDK"
export PETERFP="false"
export RESULTS_MACHINE="lowry1"
export RESULTS_DIR="libertyResults"
export LIBERTY_HOST="$(hostname)"
export LAUNCH_SCRIPT="server"
export LIBERTY_BINARIES_DIR="$1/libertyBinaries"
export LIBERTY_VERSION="openliberty-19.0.0.4"
export APP_VERSION="daytrader-ee7"
export WLP_SKIP_MAXPERMSIZE="1"

#TODO: Need to soft-code these configs. Need to add various affinity tools in the perf pre-reqs ()
export AFFINITY="numactl --physcpubind=0-3 --membind=0"

bash ${1}/scripts/bin/sufp_benchmark.sh
31 changes: 31 additions & 0 deletions performance/liberty/playlist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-->
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../TestConfig/playlist.xsd">
<test>
<testCaseName>OpenLibertyStartupDT7</testCaseName>
<command>bash $(TEST_RESROOT)/../../../openjdk-tests/performance/liberty/configs/benchmark.sh $(TEST_RESROOT); \
${TEST_STATUS}
</command>
<!-- scripts are only tested on linux -->
<platformRequirements>os.linux,arch.x86,bits.64</platformRequirements>
<levels>
<level>extended</level>
</levels>
<groups>
<group>perf</group>
</groups>
</test>
</playlist>
Loading

0 comments on commit 6be989c

Please sign in to comment.