-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
vtbench: add initial version of a vitess benchmarking tool #4032
Conversation
Implement a simple benchmark tool that is capable of running queries using either mysql or grpc protocol to a vtgate, or by grpc straight to a vttablet. Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
Nice work @demmer! This could also be the 1st building block to run bench tests for each PR and catch unexpected regressions |
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.
This is awesome. Added couple comments. LGTM.
case "grpc-vtgate": | ||
clientProto = vtbench.GRPCVtgate | ||
case "grpc-vttablet": | ||
clientProto = vtbench.GRPCVttablet |
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.
Is this to run the test directly against the tablet? We should include it in the protocol list doc string.
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.
Good idea. Done
go/vtbench/vtbench.go
Outdated
b.wg.Done() | ||
} | ||
|
||
/* |
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.
Should we remove this commented code?
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.
Whoops, thanks. Removed.
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.
Need to address @rafael's comments.
Also, it will be useful to give examples for each client type, maybe in front of the main function?
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
@sougou I addressed Rafael's comments and added a usage example. Can you let me know if this is what you had in mind before I merge? |
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.
Very nice. Good to merge once tests pass.
…grade downgrade tests (vitessio#4032) * CherryPick(vitessio#14782): Refactor Upgrade downgrade tests (vitessio#4001) * Refactor Upgrade downgrade tests (vitessio#14782) Signed-off-by: Manan Gupta <manan@planetscale.com> * test: fix test expectations given that a lot of the fixes have been backported in private Signed-off-by: Manan Gupta <manan@planetscale.com> * test: fix test expectations Signed-off-by: Manan Gupta <manan@planetscale.com> --------- Signed-off-by: Manan Gupta <manan@planetscale.com> Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Co-authored-by: Manan Gupta <manan@planetscale.com> * test: fix upgrade tests Signed-off-by: Manan Gupta <manan@planetscale.com> * test: fix tests again Signed-off-by: Manan Gupta <manan@planetscale.com> * test: fix tests again.... Signed-off-by: Manan Gupta <manan@planetscale.com> --------- Signed-off-by: Manan Gupta <manan@planetscale.com> Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com> Co-authored-by: Manan Gupta <manan@planetscale.com>
Description
Implement a simple benchmark tool that is capable of running queries using either mysql or grpc protocol to a vtgate, or by grpc straight to a vttablet.
Motivation
Although plenty of off the shelf benchmarking tools existed, I wanted one where I was able to control the parallelism and make apples to apples comparisons between mysql / grpc vtgate / grpc vttablet.