Skip to content

Commit

Permalink
Upgrade gatling
Browse files Browse the repository at this point in the history
  • Loading branch information
gold-kou committed Aug 15, 2023
1 parent 64ae7c5 commit 8e78a5a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion gatling/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@
# Cheat sheet: https://gatling.io/docs/3.2/cheat-sheet/

FROM openjdk:8-jdk-alpine
# FROM openjdk:17-jdk-slim

# working directory for gatling
WORKDIR /opt

# gating version
ENV GATLING_VERSION 3.2.1
ENV GATLING_VERSION 3.9.5
# ENV GATLING_VERSION 3.9.2

# create directory for gatling install
RUN mkdir -p gatling

# install gatling
RUN apk add --update wget bash libc6-compat && \
# RUN apt-get update && apt install -y wget bash libc6-dev unzip && \
mkdir -p /tmp/downloads && \
wget -q -O /tmp/downloads/gatling-$GATLING_VERSION.zip \
https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION-bundle.zip && \
Expand Down
7 changes: 5 additions & 2 deletions pkg/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fi
if [ ! -d ${RESULTS_DIR_PATH} ]; then
mkdir -p ${RESULTS_DIR_PATH}
fi
gatling.sh -sf ${SIMULATIONS_DIR_PATH} -s %s -rsf ${RESOURCES_DIR_PATH} -rf ${RESULTS_DIR_PATH} %s
gatling.sh -sf ${SIMULATIONS_DIR_PATH} -s %s -rsf ${RESOURCES_DIR_PATH} -rf ${RESULTS_DIR_PATH} %s %s
if [ $? -ne 0 ]; then
RUN_STATUS_FILE="${RESULTS_DIR_PATH}/FAILED"
Expand All @@ -79,14 +79,17 @@ touch ${RUN_STATUS_FILE}
generateLocalReportOption = ""
}

runModeOptionLocal := "-rm local"

return fmt.Sprintf(template,
simulationsDirectoryPath,
tempSimulationsDirectoryPath,
resourcesDirectoryPath,
resultsDirectoryPath,
startTime,
simulationClass,
generateLocalReportOption)
generateLocalReportOption,
runModeOptionLocal)
}

func GetGatlingTransferResultCommand(resultsDirectoryPath string, provider string, region string, storagePath string) string {
Expand Down

0 comments on commit 8e78a5a

Please sign in to comment.