Skip to content

Upgrade gatling version to 3.9.5 #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

12 changes: 3 additions & 9 deletions gatling/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
# This is modified based on the original file:
# https://github.com/denvazh/gatling/tree/master/3.2.1
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok to leave the comment in this section.

# Gatling is a highly capable load testing tool.
#
# Documentation: https://gatling.io/docs/3.2/
# Cheat sheet: https://gatling.io/docs/3.2/cheat-sheet/

FROM openjdk:8-jdk-alpine
FROM openjdk:17-jdk-slim
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's a good practice to include the Debian version name for clarity.
It can be confusing otherwise, whether it's buster, bullseye, or bookworm.
Since this image is based on bullseye, I'd suggest tagging it as 17-jdk-slim-bullseye.

スクリーンショット 2023-09-28 11 41 41

https://hub.docker.com/_/openjdk/tags?page=1&name=17-jdk-slim


# working directory for gatling
WORKDIR /opt

# gating version
ENV GATLING_VERSION 3.2.1
ENV GATLING_VERSION 3.9.5

# 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 && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • It's should standardize on 'apt-get'.
  • I recommend adding apt-get upgrade -y to apply package updates.
  • bash is unnecessary because it's installed by default.
Suggested change
RUN apt-get update && apt install -y wget bash libc6-dev unzip && \
RUN apt-get update && apt-get upgrade -y && apt-get install -y wget libc6-dev unzip && \

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think libc6 is required in Alpine, but I don't think it's necessary in Debian.

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