-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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: strengthen the load generator with fuzz input #2389
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.
Thank you so much for this improvement, @Lincyaw! It looks great!
Also, the tests are passing. 👍
There's just one issue regarding the requirements.in
file — see my comment(s).
src/loadgenerator/requirements.txt
Outdated
@@ -70,6 +70,7 @@ zope-event==5.0 | |||
# via gevent | |||
zope-interface==6.1 | |||
# via gevent | |||
|
|||
faker==23.2.1 | |||
# via faker |
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.
Issue: This faker
import should be specified inside src/loadgenerator/requirements.in
.
'quantity': random.choice([1,2,3,4,5,10])}) | ||
'quantity': random.randint(1,100)}) | ||
|
||
def empty_cart(l): |
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.
Thought:
Other method names use camelCase, but empty_cart
is good.
We should use snake_case for Python function names, based on this StackOverflow post.
No action needed (since this is out-of-scope for your change and you've gotten it right).
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've opened #2397. No action needed from this pull-request.
2edbc92
to
7878b9f
Compare
Thanks for your review! I will open another pull request |
Background
The original load generator only sends the same request template, which lacks diversity.
Adding a fuzzy-style request generator will make the request more general.