-
Notifications
You must be signed in to change notification settings - Fork 1
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
OJ-2748 lambda warmer stage added to performance tests #827
base: main
Are you sure you want to change the base?
Conversation
…rformance-testing into OJ-2748-lambda-warmer
…rformance-testing into OJ-2748-lambda-warmer
5e2f520
to
2264d25
Compare
Just to highlight, the latest changes mean that the lambda warmer call will be executed each iteration. |
let imposterstarted = false | ||
if (!imposterstarted) { | ||
const response = imposter.handler() | ||
console.log('Response status: ', response.status) | ||
console.log('Response body: ', response.body) | ||
imposterstarted = true | ||
} |
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.
let imposterstarted = false | |
if (!imposterstarted) { | |
const response = imposter.handler() | |
console.log('Response status: ', response.status) | |
console.log('Response body: ', response.body) | |
imposterstarted = true | |
} | |
const response = imposter.handler() | |
console.log('Response status: ', response.status) | |
console.log('Response body: ', response.body) |
This code is functionally the same as removing the imposterstarted
variable and the if statement, as it will always run.
If you are trying to run this once at the beginning of the test I'd move this call to the setup()
function, or if you want to run it once per VU the imposterstarted
will need to be declared outside of the function scope.
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.
Yea I included this in the setup()
function initially but I had a chat with Sandra and was advised that this needs to run periodically instead of only once.
To avoid running this as many time as the actual test iterations, we may have a separate function for this which will be called like 10% or 20% of the total number of executed iterations
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.
Okay, well that approach will need to be implemented and the code smell fixed first before merging
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.
Updated the approach to make 10 concurrent request (as a batch request) in the setUp
function and fixed the code smell.
Quality Gate passedIssues Measures |
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.
Update the PR title, but otherwise okay
What?
Set up stage for imposter stub to warm up lambdas before performance testing is ran.
Changes:
Why?
Related: