Skip to content
Snippets Groups Projects
Commit d90db696 authored by Krzysztof Mochocki's avatar Krzysztof Mochocki
Browse files

Update links and fixes after rebase

parent 3e84d307
No related branches found
No related tags found
No related merge requests found
......@@ -3,17 +3,26 @@
FROM alpine as jmeter_dependencies
# install all required dependencies
RUN apk add git bash openjdk8 python3 py3-pip maven
RUN python3 -m pip install --upgrade pip && pip install prettytable requests
RUN apk add git bash openjdk8 python3 py3-pip maven curl py3-virtualenv
ENV POETRY_VERSION 1.8.1
RUN curl -sSL https://install.python-poetry.org > poetry-install.py
RUN python3 poetry-install.py
ENV POETRY_BIN /root/.local/bin/poetry
# base environments
ENV SOURCES /sources
ENV WDIR /jmeter
ENV BENCHMARK_DIR ${WDIR}/benchmarks
# set working directory in container
WORKDIR ${WDIR}
# get required resources from current build dir
ADD . ${BENCHMARK_DIR}
ADD . ${SOURCES}
# install python dependencies
ENV VENV /root/.venv/bin/activate
RUN python3 -m venv /root/.venv && source ${VENV} && /root/.local/bin/poetry -C ${SOURCES} install
# clean directories
RUN cp -r ${SOURCES}/benchmarks ${BENCHMARK_DIR} && rm -rf ${SOURCES}
# configure java
ENV JAVA_ARGS -Xms4g -Xmx4g
......@@ -37,10 +46,10 @@ FROM jmeter_dependencies AS benchmark_aio
WORKDIR ${BENCHMARK_DIR}
# api to test
ENV API="account_history_api"
ENV API="universal"
# input file to use for performance testing
ENV CSV="perf_60M_heavy.csv"
ENV CSV="/jmeter/benchmarks/performance_data/universal/CSV/2022_11_16_hivemind_60M_prod_jrpc.csv"
# amount of threads
ENV JOBS=10
......@@ -52,10 +61,10 @@ ENV LOOPS=500
ENV CALL_STYLE="old-style"
# address to test (default is set to default host address in docker)
ENV ADDRESS='172.17.0.1'
ENV ADDRESS='192.168.6.122'
# port to perform tests
ENV PORT=8090
ENV PORT=17002
# url to postgres database (required only if CALL_STYLE = postgres)
ENV POSTGRES_URL="postgresql:///haf_block_log"
......@@ -70,14 +79,15 @@ ENV ROOT_DIR="${WDIR}"
ENV SERVE_PORT=""
# additional arguments that will be passed to benchmarking script
ENV ADDITIONAL_ARGS=""
ENV ADDITIONAL_ARGS="--skip-version-check"
# path to directory, where jmeter and python benchmark script will put all it's output
ENV JMETER_WORKDIR=${ROOT_DIR}/wdir
# verification is setup ready
RUN python3 benchmark.py -h
RUN python3 benchmark.py -n ${API} -l
RUN source ${VENV} && python3 -m pip list
RUN source ${VENV} && python3 benchmark.py -h
RUN source ${VENV} && python3 benchmark.py -n ${API} -l
# defines what to do after docker starts
ENTRYPOINT bash ${ROOT_DIR}/benchmarks/docker/entrypoint.bash $ADDITIONAL_ARGS
#!/usr/bin/python3
import logging
import sys
from argparse import ArgumentParser
......
......@@ -4,7 +4,7 @@ echo "setting up paths"
mkdir -p "$JMETER_WORKDIR"
echo "starting benchmarks"
python3 "$ROOT_DIR/benchmarks/benchmark.py" \
source $VENV && python3 "$ROOT_DIR/benchmarks/benchmark.py" \
-r "$ROOT_DIR" \
-d "$JMETER_WORKDIR" \
-j "$JMETER" \
......
......@@ -3,8 +3,8 @@
set -euo pipefail
WORKDIR=jmeter
JMETER_DOWNLOAD_URL="https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.4.3.zip"
JMETER_POSTGRES_DOWNLOAD_URL="https://jdbc.postgresql.org/download/postgresql-42.3.1.jar"
JMETER_DOWNLOAD_URL="https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.6.3.zip"
JMETER_POSTGRES_DOWNLOAD_URL="https://jdbc.postgresql.org/download/postgresql-42.7.4.jar"
if [[ -f "$WORKDIR/activate" ]]; then
echo "using cached jmeter"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment