Skip to content

Commit

Permalink
Merge pull request #1751 from sthaha/chore-cmp-absolute
Browse files Browse the repository at this point in the history
chore(validator): compare aggregate (dyn+idle) power
  • Loading branch information
vprashar2929 authored Sep 2, 2024
2 parents 0433ade + a88d7ee commit 295ce9d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
2 changes: 1 addition & 1 deletion e2e/tools/validator/src/validator/validations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def metric_name(self) -> str:
def mode(self) -> str:
m = re.search(r"mode=['\"]([a-z]+)['\"]", self._promql)
if not m:
return "unknown"
return "absolute"
return m.group(1)


Expand Down
61 changes: 61 additions & 0 deletions e2e/tools/validator/validations.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,63 @@
validations:
# absolute power comparison
- name: platform - absolute
actual: |
sum(
rate(
kepler_{level}_platform_joules_total{{
job="{metal_job_name}",
{vm_selector},
}}[{rate_interval}]
)
)
expected: |
sum(
rate(
kepler_node_platform_joules_total{{
job="{vm_job_name}",
}}[{rate_interval}]
)
)
- name: package - absolute
actual: |
sum(
rate(
kepler_{level}_package_joules_total{{
job="{metal_job_name}",
{vm_selector},
}}[{rate_interval}]
)
)
expected: |
sum(
rate(
kepler_node_package_joules_total{{
job="{vm_job_name}",
}}[{rate_interval}]
)
)
- name: core - absolute
actual: |
sum(
rate(
kepler_{level}_core_joules_total{{
job="{metal_job_name}",
{vm_selector},
}}[{rate_interval}]
)
)
expected: |
sum(
rate(
kepler_node_core_joules_total{{
job="{vm_job_name}",
}}[{rate_interval}]
)
)
# dynamic power comparison
- name: platform - dynamic
actual: |
rate(
Expand Down Expand Up @@ -67,6 +126,8 @@ validations:
}}[{rate_interval}]
)
# idle power comparison

- name: platform - idle
actual: |
rate(
Expand Down

0 comments on commit 295ce9d

Please sign in to comment.