-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add script for spring #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@genryxy thanks
@g4s8 could you please check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@genryxy please check my comments
spring-file/jmx-run.sh
Outdated
@@ -0,0 +1,12 @@ | |||
#!/bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not bash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know exactly the difference between bash and sh, but as I understand bash is more featured sh therefore it would be better to use bash here
@@ -0,0 +1,12 @@ | |||
#!/bin/sh | |||
# Run performance tests for Spring Boot server locally | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest adding set -eo pipefail
for any script:
-e
for "Exit immediately if a command exits with a non-zero status."-o pipefail
for "the return value of a pipeline is the status of the last command to exit with a non-zero status, or zero if no command exited with a non-zero status"
@@ -0,0 +1,12 @@ | |||
#!/bin/sh | |||
# Run performance tests for Spring Boot server locally | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you use relative paths here, I'd add cd ${0%/*}
as first command to cd
into script directory
spring-file/jmx-run.sh
Outdated
rm -rf spring-upload-res | ||
rm spring-upload.log | ||
|
||
mkdir -p spring-upload-res |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why -p
is needed here? You are removing this directory with previous command
spring-file/jmx-run.sh
Outdated
|
||
echo "Run jmeter tests" | ||
"PATH_TO_JMETER" jmeter -n -t ../files/upload-files.jmx -l spring-upload.log -e -o ./spring-upload-res -Jrepository.host=localhost -Jrepository.port=8080 | ||
sleep 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of sleep?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it was for debug purpose
spring-file/spring-run.sh
Outdated
@@ -0,0 +1,7 @@ | |||
#!/bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous comments could be applied here too
spring-file/spring-run.sh
Outdated
|
||
mvn clean install | ||
mvn dependency:copy-dependencies | ||
rm rf spring.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm rf spring.log | |
rm -f spring.log |
@g4s8 thanks, all corrected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@genryxy thanks
Part of #47
Added script for running jmx for Spring Boot locally.