Skip to content

Commit

Permalink
update task about sysbench_run_test_tenant_cpu_used.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
wayyoungboy committed Jun 11, 2024
1 parent 52589dd commit 87be937
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions handler/checker/check_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def handle(self):
if self.export_report_type not in ["table", "json", "xml", "yaml"]:
raise CheckException("report_type must be table, json, xml, yaml")
self.stdio.verbose("export_report_path is " + self.export_report_path)

# get package's by package_name
self.tasks = {}
if package_name:
Expand All @@ -160,10 +159,13 @@ def handle(self):
if len(filter_tasks) > 0:
self.tasks = {key: value for key, value in self.tasks.items() if key not in filter_tasks}
new_tasks = {}
for filter_task in filter_tasks:
for task_name, task_value in self.tasks.items():
if re.match(filter_task.strip(), task_name.strip()) is None:
new_tasks[task_name] = task_value
for task_name, task_value in self.tasks.items():
filter_tag = False
for filter_task in filter_tasks:
if re.match(filter_task.strip(), task_name.strip()):
filter_tag = True
if not filter_tag:
new_tasks[task_name] = task_value
self.tasks = new_tasks
self.stdio.verbose("tasks is {0}".format(self.tasks.keys()))
except Exception as e:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
info: 'Check when sysbench free , cluster info about network_speed'
info: 'Check when sysbench run , cluster info about cpu'
task:
- version: "[4.0.0.0,*]"
steps:
Expand All @@ -9,6 +9,8 @@ FROM oceanbase.DBA_OB_TENANTS
WHERE TENANT_TYPE='USER' limit 1;"
result:
set_value: tenant_id
verify: '[ -n "${tenant_id}" ]'
err_msg: "tenant_id is null . Please check your tenant without sys"
- type: sql
sql: 'select VALUE from oceanbase.GV$OB_PARAMETERS where Name="cpu_quota_concurrency"
and TENANT_ID="#{tenant_id}"
Expand Down

0 comments on commit 87be937

Please sign in to comment.