-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace expected and actual query with single query (#1489)
* WIP: Replace expected and actual query with single query Instead of using two separate queries which the validator will use to calculate the error metrics, replace with a single promql query which will calculate and return the error metric to the validator. Signed-off-by: Kaiyi <[email protected]> * Resolve Proportion Error with promql query Resolved Division in promql query by introducing a new dummy label and on function to allow different metrics with differing labels to still be operands for prometheus operators like +, - , /. Signed-off-by: Kaiyi <[email protected]> * Convert job=vm into a vm_query parameter Added vm_query parameter which can be replaced with query for vm related labels. Signed-off-by: Kaiyi <[email protected]> * Remove Comments and Unnecessary Functions Removed Commented code and unneeded functions Signed-off-by: Kaiyi <[email protected]> * Remove labelchange function for promql queries Instead of using on() with labelchange, removed labelchange function completely and used only on() Signed-off-by: Kaiyi <[email protected]> --------- Signed-off-by: Kaiyi <[email protected]>
- Loading branch information
1 parent
89ebf4e
commit 07636b1
Showing
4 changed files
with
30 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
[ | ||
{ | ||
"expected_query": "rate(kepler_{level}_package_joules_total{{{query}, mode='dynamic'}}[{interval}])", | ||
"actual_query": "rate(kepler_node_platform_joules_total[{interval}])" | ||
}, | ||
{ | ||
"expected_query": "rate(kepler_{level}_platform_joules_total{{{query}, mode='dynamic'}}[{interval}])", | ||
"actual_query": "rate(kepler_node_platform_joules_total[{interval}])" | ||
}, | ||
{ | ||
"expected_query": "rate(kepler_{level}_bpf_cpu_time_ms_total{{{query}}}[{interval}])", | ||
"actual_query": "sum by(__name__, job) (rate(kepler_process_bpf_cpu_time_ms_total[{interval}]))" | ||
}, | ||
{ | ||
"expected_query": "rate(kepler_{level}_bpf_page_cache_hit_total{{{query}}}[{interval}])", | ||
"actual_query": "sum by(__name__, job) (rate(kepler_process_bpf_page_cache_hit_total[{interval}]))" | ||
} | ||
"abs((rate(kepler_{level}_package_joules_total{{{query}, job='metal', mode='dynamic'}}[{interval}]) - on() rate(kepler_node_platform_joules_total{{{vm_query}}}[{interval}])) / on() rate(kepler_{level}_package_joules_total{{{query}, job='metal', mode='dynamic'}}[{interval}]))", | ||
"abs((rate(kepler_{level}_platform_joules_total{{{query}, job='metal', mode='dynamic'}}[{interval}]) - on() rate(kepler_node_platform_joules_total{{{vm_query}}}[{interval}])) / on() rate(kepler_{level}_platform_joules_total{{{query}, job='metal', mode='dynamic'}}[{interval}]))" | ||
|
||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters