Skip to content
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

resource_control: calibrate resource support sysbench #42695

Merged
merged 5 commits into from
Apr 14, 2023
Merged
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
Prev Previous commit
Next Next commit
merge upstream
Signed-off-by: husharp <[email protected]>
HuSharp committed Apr 12, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 255f22c4bcfc768f86067d5a9c7dd0d618eab863
2 changes: 1 addition & 1 deletion executor/calibrate_resource.go
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ import (
// but is enough here because the maximum RU capacity is depended on both the cluster and
// the workload.
var workloadBaseRUCostMap = map[ast.CalibrateResourceType]*baseResourceCost{
ast.CalibrateResourceTPCC: {
ast.TPCC: {
tidbCPU: 0.6,
kvCPU: 0.15,
readBytes: units.MiB / 2,
4 changes: 2 additions & 2 deletions metrics/grafana/tidb_resource_control.json
Original file line number Diff line number Diff line change
@@ -2164,7 +2164,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Seccessful KV Request Wait Duration",
"title": "Successful KV Request Wait Duration",
"tooltip": {
"msResolution": true,
"shared": true,
@@ -2280,7 +2280,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Seccessful KV Request Count",
"title": "Successful KV Request Count",
"tooltip": {
"msResolution": true,
"shared": true,
4 changes: 2 additions & 2 deletions parser/ast/misc.go
Original file line number Diff line number Diff line change
@@ -3726,15 +3726,15 @@ type CalibrateResourceType int

// calibrate resource [ workload < TPCC | OLTP_READ_WRITE | OLTP_READ_ONLY | OLTP_WRITE_ONLY> ]
const (
CalibrateResourceTPCC CalibrateResourceType = iota
TPCC CalibrateResourceType = iota
OLTPREADWRITE
OLTPREADONLY
OLTPWRITEONLY
)

func (n CalibrateResourceType) Restore(ctx *format.RestoreCtx) error {
switch n {
case CalibrateResourceTPCC:
case TPCC:
ctx.WriteKeyWord(" WORKLOAD TPCC")
case OLTPREADWRITE:
ctx.WriteKeyWord(" WORKLOAD OLTP_READ_WRITE")
8 changes: 4 additions & 4 deletions parser/misc.go
Original file line number Diff line number Diff line change
@@ -845,10 +845,10 @@ var tokenMap = map[string]int{
"WITHOUT": without,
"WRITE": write,
"WORKLOAD": workload,
"TPCC": workloadTpcc,
"OLTP_READ_WRITE": workloadOltpReadWrite,
"OLTP_READ_ONLY": workloadOltpReadOnly,
"OLTP_WRITE_ONLY": workloadOltpWriteOnly,
"TPCC": tpcc,
"OLTP_READ_WRITE": oltpReadWrite,
"OLTP_READ_ONLY": oltpReadOnly,
"OLTP_WRITE_ONLY": oltpWriteOnly,
"X509": x509,
"XOR": xor,
"YEAR_MONTH": yearMonth,
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.