monitoring(testing): show LOC compliance as positive percent

This commit is contained in:
jenkins 2026-05-11 17:36:13 -03:00
parent d01cfe9066
commit 58adb757c4
15 changed files with 1282 additions and 2082 deletions

View File

@ -190,6 +190,7 @@ def _build_payload(
jenkins_job: str,
summary: dict | None = None,
workspace_line_coverage_percent: float = 0.0,
source_files_total: int = 0,
source_lines_over_500: int = 0,
check_statuses: dict[str, str] | None = None,
) -> str:
@ -227,6 +228,8 @@ def _build_payload(
f"titan_iac_quality_gate_build_info{build_labels} 1",
"# TYPE platform_quality_gate_workspace_line_coverage_percent gauge",
f'platform_quality_gate_workspace_line_coverage_percent{{suite="{suite}"}} {workspace_line_coverage_percent:.3f}',
"# TYPE platform_quality_gate_source_files_total gauge",
f'platform_quality_gate_source_files_total{{suite="{suite}"}} {source_files_total}',
"# TYPE platform_quality_gate_source_lines_over_500_total gauge",
f'platform_quality_gate_source_lines_over_500_total{{suite="{suite}"}} {source_lines_over_500}',
]
@ -278,6 +281,7 @@ def main() -> int:
workspace_line_coverage_percent = _summary_float(summary, "workspace_line_coverage_percent")
if workspace_line_coverage_percent <= 0:
workspace_line_coverage_percent = _infer_workspace_coverage_percent(summary, "build/coverage-unit.xml")
source_files_total = _summary_int(summary, "source_files_total")
source_lines_over_500 = _summary_int(summary, "source_lines_over_500")
if source_lines_over_500 <= 0:
source_lines_over_500 = _infer_source_lines_over_500(summary)
@ -325,6 +329,7 @@ def main() -> int:
jenkins_job=jenkins_job,
summary=summary,
workspace_line_coverage_percent=workspace_line_coverage_percent,
source_files_total=source_files_total,
source_lines_over_500=source_lines_over_500,
check_statuses=check_statuses,
)
@ -342,6 +347,7 @@ def main() -> int:
"failed_count": failed_count,
"checks_recorded": len(check_statuses),
"workspace_line_coverage_percent": workspace_line_coverage_percent,
"source_files_total": source_files_total,
"source_lines_over_500": source_lines_over_500,
}
print(json.dumps(summary, sort_keys=True))

View File

@ -1284,7 +1284,7 @@ def bargauge_panel(
"overrides": [],
},
"options": {
"displayMode": "gradient",
"displayMode": "basic",
"orientation": "horizontal",
"reduceOptions": {
"calcs": ["lastNotNull"],
@ -3153,9 +3153,31 @@ def build_jobs_dashboard():
)
coverage_gap = f"clamp_min(95 - ({coverage_by_suite}), 0)"
smell_by_suite = f'max by (suite) (platform_quality_gate_source_lines_over_500_total{{{smell_selector}}})'
loc_files_by_suite = f'max by (suite) (platform_quality_gate_source_files_total{{{smell_selector}}})'
smell_with_missing = (
f"({smell_by_suite}) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_selector}}}[30d])))) - 1)"
)
loc_limit_compliance_by_suite = (
f"(100 * clamp_min(({loc_files_by_suite}) - ({smell_by_suite}), 0) / ({loc_files_by_suite})) "
f"and on(suite) (({loc_files_by_suite}) > 0)"
)
loc_limit_compliance_with_missing = (
f"({loc_limit_compliance_by_suite}) "
f"or on(suite) (100 * (1 - clamp_max(({smell_by_suite}), 1))) "
f"or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_selector}}}[30d])))) - 1)"
)
loc_files_history = (
f"max by (suite) (max_over_time(platform_quality_gate_source_files_total{{{smell_selector}}}[$__interval]))"
)
loc_violations_history = (
f"max by (suite) (max_over_time(platform_quality_gate_source_lines_over_500_total{{{smell_selector}}}[$__interval]))"
)
loc_limit_compliance_history = (
f"(100 * clamp_min(({loc_files_history}) - ({loc_violations_history}), 0) / ({loc_files_history})) "
f"and on(suite) (({loc_files_history}) > 0) "
f"or on(suite) (100 * (1 - clamp_max(({loc_violations_history}), 1))) "
f"or on(suite) ({selected_suite_zero})"
)
average_coverage = f"(avg(({coverage_by_suite})) or on() vector(0))"
suites_loc_violating = f'(sum((({smell_by_suite}) > bool 0)) or on() vector(0))'
@ -3224,7 +3246,8 @@ def build_jobs_dashboard():
f"count by (suite) (platform_quality_gate_workspace_line_coverage_percent{{{exported}}})"
)
missing_loc_by_suite = _missing_suite_series(
f"count by (suite) (platform_quality_gate_source_lines_over_500_total{{{exported}}})"
f"count by (suite) (platform_quality_gate_source_lines_over_500_total{{{exported}}}) "
f"and on(suite) count by (suite) (platform_quality_gate_source_files_total{{{exported}}})"
)
missing_test_case_by_suite = _missing_suite_series(
f"count by (suite) (platform_quality_gate_test_case_result{{{exported}}})"
@ -3461,10 +3484,10 @@ def build_jobs_dashboard():
panels.append(
timeseries_panel(
13,
"Coverage & LOC History (Selected Scope)",
"Coverage & LOC Compliance History",
None,
{"h": 8, "w": 8, "x": 8, "y": 21},
unit="none",
unit="percent",
targets=[
{
"refId": "A",
@ -3473,8 +3496,8 @@ def build_jobs_dashboard():
},
{
"refId": "B",
"expr": f'max_over_time(platform_quality_gate_source_lines_over_500_total{{{smell_selector}}}[$__interval])',
"legendFormat": "{{suite}} files >500 LOC",
"expr": loc_limit_compliance_history,
"legendFormat": "{{suite}} files <=500 LOC %",
},
],
legend_display="list",
@ -3623,18 +3646,20 @@ def build_jobs_dashboard():
smell_panel = bargauge_panel(
18,
"Files >500 LOC by Suite (Latest)",
smell_with_missing,
"Files <=500 LOC by Suite (Latest)",
loc_limit_compliance_with_missing,
{"h": 8, "w": 12, "x": 12, "y": 73},
unit="none",
unit="percent",
instant=True,
legend="{{suite}}",
sort_order="desc",
thresholds=smell_thresholds,
sort_order="asc",
thresholds=success_thresholds,
decimals=0,
)
smell_panel["fieldConfig"]["defaults"]["mappings"] = [
{"type": "value", "options": {"-1": {"text": "missing"}}}
]
smell_panel["description"] = "Percent of managed LOC-gated files at or under 500 lines. Older suite payloads fall back to 100%/0% until they emit platform_quality_gate_source_files_total."
panels.append(smell_panel)
panels.append(
@ -3682,7 +3707,7 @@ def build_jobs_dashboard():
panels.append(
bargauge_panel(
30,
"Missing LOC Metrics by Suite",
"Missing LOC Compliance Metrics by Suite",
missing_loc_by_suite,
{"h": 7, "w": 6, "x": 18, "y": 81},
unit="none",

View File

@ -522,6 +522,8 @@ data_prepper_quality_gate_tests_total{suite="${suite}",result="skipped"} ${test_
# No coverable project source is present in this packaging suite; report full
# non-applicable coverage so rollups do not confuse N/A with uncovered code.
platform_quality_gate_workspace_line_coverage_percent{suite="${suite}"} 100
# TYPE platform_quality_gate_source_files_total gauge
platform_quality_gate_source_files_total{suite="${suite}"} 0
# TYPE platform_quality_gate_source_lines_over_500_total gauge
platform_quality_gate_source_lines_over_500_total{suite="${suite}"} 0
# TYPE platform_quality_gate_build_info gauge

View File

@ -779,7 +779,7 @@
{
"id": 18,
"type": "bargauge",
"title": "Files >500 LOC by Suite (Latest)",
"title": "Files <=500 LOC by Suite (Latest)",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -792,7 +792,7 @@
},
"targets": [
{
"expr": "sort_desc((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])))) - 1))",
"expr": "sort(((100 * clamp_min((max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) - (max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})), 0) / (max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}))) and on(suite) ((max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) > 0)) or on(suite) (100 * (1 - clamp_max((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})), 1))) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])))) - 1))",
"refId": "A",
"legendFormat": "{{suite}}",
"instant": true
@ -803,9 +803,9 @@
"color": {
"mode": "thresholds"
},
"unit": "none",
"unit": "percent",
"min": 0,
"max": null,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
@ -814,23 +814,24 @@
"value": null
},
{
"color": "green",
"value": 0
"color": "orange",
"value": 90
},
{
"color": "yellow",
"value": 1
"value": 93
},
{
"color": "orange",
"value": 3
"color": "green",
"value": 95
},
{
"color": "red",
"value": 5
"color": "blue",
"value": 100
}
]
},
"decimals": 0,
"mappings": [
{
"type": "value",
@ -862,10 +863,11 @@
"fields": [
"Value"
],
"order": "desc"
"order": "asc"
}
}
]
],
"description": "Percent of managed LOC-gated files at or under 500 lines. Older suite payloads fall back to 100%/0% until they emit platform_quality_gate_source_files_total."
},
{
"id": 500,
@ -981,7 +983,7 @@
{
"id": 13,
"type": "timeseries",
"title": "Coverage & LOC History (Selected Scope)",
"title": "Coverage & LOC Compliance History",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -1000,13 +1002,13 @@
},
{
"refId": "B",
"expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])",
"legendFormat": "{{suite}} files >500 LOC"
"expr": "(100 * clamp_min((max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))) - (max by (suite) (max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))), 0) / (max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])))) and on(suite) ((max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))) > 0) or on(suite) (100 * (1 - clamp_max((max by (suite) (max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))), 1))) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))",
"legendFormat": "{{suite}} files <=500 LOC %"
}
],
"fieldConfig": {
"defaults": {
"unit": "none"
"unit": "percent"
},
"overrides": []
},
@ -2612,7 +2614,7 @@
{
"id": 30,
"type": "bargauge",
"title": "Missing LOC Metrics by Suite",
"title": "Missing LOC Compliance Metrics by Suite",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -2625,7 +2627,7 @@
},
"targets": [
{
"expr": "sort_desc((((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"}))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\"))))",
"expr": "sort_desc((((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"}) and on(suite) count by (suite) (platform_quality_gate_source_files_total{exported_job=\"platform-quality-ci\"}))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\"))))",
"refId": "A",
"legendFormat": "{{suite}}",
"instant": true

File diff suppressed because it is too large Load Diff

View File

@ -447,6 +447,9 @@
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"unit": "none",
"min": 0,
"max": null,
@ -476,7 +479,7 @@
"overrides": []
},
"options": {
"displayMode": "gradient",
"displayMode": "basic",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [

View File

@ -20,9 +20,39 @@
},
"targets": [
{
"expr": "label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\") or label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{ups}} {{metric}}",
"expr": "max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)",
"legendFormat": "Pyrphoros Draw (W)",
"instant": true
},
{
"refId": "B",
"expr": "max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)",
"legendFormat": "Pyrphoros Discharge",
"instant": true
},
{
"refId": "C",
"expr": "max(ananke_ups_on_battery{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)",
"legendFormat": "Pyrphoros Status",
"instant": true
},
{
"refId": "D",
"expr": "max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)",
"legendFormat": "Statera Draw (W)",
"instant": true
},
{
"refId": "E",
"expr": "max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)",
"legendFormat": "Statera Discharge",
"instant": true
},
{
"refId": "F",
"expr": "max(ananke_ups_on_battery{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)",
"legendFormat": "Statera Status",
"instant": true
}
],
@ -54,25 +84,121 @@
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": ".*Draw$"
"id": "byName",
"options": "Pyrphoros Draw (W)"
},
"properties": [
{
"id": "unit",
"value": "watt"
},
{
"id": "description",
"value": "Attached node: titan-db"
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": ".*Runtime$"
"id": "byName",
"options": "Statera Draw (W)"
},
"properties": [
{
"id": "unit",
"value": "watt"
},
{
"id": "description",
"value": "Attached node: titan-24"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pyrphoros Discharge"
},
"properties": [
{
"id": "unit",
"value": "s"
},
{
"id": "description",
"value": "Attached node: titan-db"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Statera Discharge"
},
"properties": [
{
"id": "unit",
"value": "s"
},
{
"id": "description",
"value": "Attached node: titan-24"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pyrphoros Status"
},
"properties": [
{
"id": "mappings",
"value": [
{
"type": "value",
"options": {
"0": {
"text": "\u26a1 Charging"
},
"1": {
"text": "\ud83d\udd0b Discharging"
}
}
}
]
},
{
"id": "description",
"value": "Attached node: titan-db"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Statera Status"
},
"properties": [
{
"id": "mappings",
"value": [
{
"type": "value",
"options": {
"0": {
"text": "\u26a1 Charging"
},
"1": {
"text": "\ud83d\udd0b Discharging"
}
}
}
]
},
{
"id": "description",
"value": "Attached node: titan-24"
}
]
}
@ -90,14 +216,10 @@
"values": false
},
"textMode": "name_and_value",
"orientation": "vertical",
"wideLayout": false,
"text": {
"titleSize": 14,
"valueSize": 24
}
"orientation": "horizontal",
"wideLayout": true
},
"description": "Per-UPS live snapshot: draw, discharge runtime, and charging/discharging status."
"description": "Per-UPS live snapshot: current draw in watts, estimated battery runtime if discharge started now, and charging/discharging status."
},
{
"id": 2,
@ -158,9 +280,27 @@
},
"targets": [
{
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32) or on() vector(0)), \"metric\", \"Temp \u00b0F\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{metric}}",
"expr": "max(typhon_temperature_celsius) or on() vector(0)",
"legendFormat": "Tent Temp (\u00b0C)",
"instant": true
},
{
"refId": "B",
"expr": "max(typhon_vpd_kpa) or on() vector(0)",
"legendFormat": "Tent VPD (kPa)",
"instant": true
},
{
"refId": "C",
"expr": "max(typhon_relative_humidity_percent) or on() vector(0)",
"legendFormat": "Tent RH (%)",
"instant": true
},
{
"refId": "D",
"expr": "max((243.12 * (ln(clamp_min(typhon_relative_humidity_percent, 1) / 100) + (17.62 * typhon_temperature_celsius) / (243.12 + typhon_temperature_celsius))) / (17.62 - (ln(clamp_min(typhon_relative_humidity_percent, 1) / 100) + (17.62 * typhon_temperature_celsius) / (243.12 + typhon_temperature_celsius)))) or on() vector(0)",
"legendFormat": "Dew Point (\u00b0C)",
"instant": true
}
],
@ -193,7 +333,7 @@
{
"matcher": {
"id": "byName",
"options": "Temp \u00b0C"
"options": "Tent Temp (\u00b0C)"
},
"properties": [
{
@ -205,19 +345,19 @@
{
"matcher": {
"id": "byName",
"options": "Temp \u00b0F"
"options": "Tent VPD (kPa)"
},
"properties": [
{
"id": "unit",
"value": "fahrenheit"
"value": "suffix:kPa"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Humidity"
"options": "Tent RH (%)"
},
"properties": [
{
@ -229,12 +369,12 @@
{
"matcher": {
"id": "byName",
"options": "Pressure"
"options": "Dew Point (\u00b0C)"
},
"properties": [
{
"id": "unit",
"value": "suffix:kPa"
"value": "celsius"
}
]
}
@ -252,14 +392,10 @@
"values": false
},
"textMode": "name_and_value",
"orientation": "vertical",
"wideLayout": false,
"text": {
"titleSize": 16,
"valueSize": 28
}
"orientation": "horizontal",
"wideLayout": true
},
"description": "Current tent values: Temp \u00b0C, Temp \u00b0F, Humidity, Pressure."
"description": "Current tent temperature, humidity, VPD, and dew point. These render once Typhon climate telemetry is online."
},
{
"id": 4,
@ -278,70 +414,30 @@
"targets": [
{
"refId": "A",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)",
"expr": "typhon_temperature_celsius",
"legendFormat": "Temperature (\u00b0C)"
},
{
"refId": "B",
"expr": "(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32",
"legendFormat": "Temperature (\u00b0F)"
},
{
"refId": "C",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)",
"expr": "typhon_relative_humidity_percent",
"legendFormat": "Humidity (%)"
},
{
"refId": "C",
"expr": "typhon_vpd_kpa",
"legendFormat": "VPD (kPa)"
},
{
"refId": "D",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)",
"legendFormat": "Pressure (VPD kPa)"
"expr": "(243.12 * (ln(clamp_min(typhon_relative_humidity_percent, 1) / 100) + (17.62 * typhon_temperature_celsius) / (243.12 + typhon_temperature_celsius))) / (17.62 - (ln(clamp_min(typhon_relative_humidity_percent, 1) / 100) + (17.62 * typhon_temperature_celsius) / (243.12 + typhon_temperature_celsius)))",
"legendFormat": "Dew Point (\u00b0C)"
}
],
"fieldConfig": {
"defaults": {
"unit": "none"
"unit": "celsius"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Temperature (\u00b0C)"
},
"properties": [
{
"id": "unit",
"value": "suffix:\u00b0C"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
{
"matcher": {
"id": "byName",
"options": "Temperature (\u00b0F)"
},
"properties": [
{
"id": "unit",
"value": "suffix:\u00b0F"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
{
"matcher": {
"id": "byName",
@ -350,43 +446,31 @@
"properties": [
{
"id": "unit",
"value": "suffix:%"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisPlacement",
"value": "right"
},
{
"id": "custom.axisCenteredZero",
"value": false
"value": "percent"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pressure (VPD kPa)"
"options": "VPD (kPa)"
},
"properties": [
{
"id": "unit",
"value": "suffix:kPa"
"value": "none"
},
{
"id": "custom.axisPlacement",
"value": "right"
},
{
"id": "decimals",
"value": 2
"id": "custom.axisLabel",
"value": "kPa"
},
{
"id": "custom.axisCenteredZero",
"value": false
"id": "decimals",
"value": 2
}
]
}
@ -401,7 +485,7 @@
"mode": "multi"
}
},
"description": "Historical tent temperature (C/F), humidity, and pressure proxy (VPD kPa)."
"description": "Two-axis chart: tent temperature/humidity/dew point (left axis) and tent VPD in kPa (right axis)."
},
{
"id": 5,
@ -419,9 +503,27 @@
},
"targets": [
{
"expr": "label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})) or on() vector(0))), \"metric\", \"Outlet\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})) or on() vector(0))), \"metric\", \"Inlet - In\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})) or on() vector(0))), \"metric\", \"Inlet - Out\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})) or on() vector(0))), \"metric\", \"Interior\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{metric}}",
"expr": "round(max(typhon_fan_speed_level{fan_group=\"outlet\"}) or on() vector(0))",
"legendFormat": "Inside Outlet",
"instant": true
},
{
"refId": "B",
"expr": "round(max(typhon_fan_speed_level{fan_group=\"inside_inlet\"}) or on() vector(0))",
"legendFormat": "Inside Inlet",
"instant": true
},
{
"refId": "C",
"expr": "round(max(typhon_fan_speed_level{fan_group=\"outside_inlet\"}) or on() vector(0))",
"legendFormat": "Outside Inlet",
"instant": true
},
{
"refId": "D",
"expr": "round(max(typhon_fan_speed_level{fan_group=\"interior\"}) or on() vector(0))",
"legendFormat": "Interior Fans",
"instant": true
}
],
@ -454,56 +556,7 @@
},
"decimals": 0
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Outlet"
},
"properties": [
{
"id": "decimals",
"value": 0
}
]
},
{
"matcher": {
"id": "byName",
"options": "Inlet - In"
},
"properties": [
{
"id": "decimals",
"value": 0
}
]
},
{
"matcher": {
"id": "byName",
"options": "Inlet - Out"
},
"properties": [
{
"id": "decimals",
"value": 0
}
]
},
{
"matcher": {
"id": "byName",
"options": "Interior"
},
"properties": [
{
"id": "decimals",
"value": 0
}
]
}
]
"overrides": []
},
"options": {
"colorMode": "value",
@ -517,10 +570,10 @@
"values": false
},
"textMode": "name_and_value",
"orientation": "vertical",
"wideLayout": false
"orientation": "horizontal",
"wideLayout": true
},
"description": "Current fan activity levels: outlet, inlet in, inlet out, interior (0-10)."
"description": "Current fan activity levels (0-10): inside outlet, inside inlet, outside inlet, and interior fans."
},
{
"id": 6,
@ -539,23 +592,23 @@
"targets": [
{
"refId": "A",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})",
"legendFormat": "Outlet"
"expr": "typhon_fan_speed_level{fan_group=\"outlet\"}",
"legendFormat": "Inside Outlet"
},
{
"refId": "B",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})",
"legendFormat": "Inlet - Inside"
"expr": "typhon_fan_speed_level{fan_group=\"inside_inlet\"}",
"legendFormat": "Inside Inlet"
},
{
"refId": "C",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})",
"legendFormat": "Inlet - Outside"
"expr": "typhon_fan_speed_level{fan_group=\"outside_inlet\"}",
"legendFormat": "Outside Inlet"
},
{
"refId": "D",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})",
"legendFormat": "Interior"
"expr": "typhon_fan_speed_level{fan_group=\"interior\"}",
"legendFormat": "Interior Fans"
}
],
"fieldConfig": {

View File

@ -779,7 +779,7 @@
{
"id": 18,
"type": "bargauge",
"title": "Files >500 LOC by Suite (Latest)",
"title": "Files <=500 LOC by Suite (Latest)",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -792,7 +792,7 @@
},
"targets": [
{
"expr": "sort_desc((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])))) - 1))",
"expr": "sort(((100 * clamp_min((max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) - (max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})), 0) / (max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}))) and on(suite) ((max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) > 0)) or on(suite) (100 * (1 - clamp_max((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})), 1))) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])))) - 1))",
"refId": "A",
"legendFormat": "{{suite}}",
"instant": true
@ -803,9 +803,9 @@
"color": {
"mode": "thresholds"
},
"unit": "none",
"unit": "percent",
"min": 0,
"max": null,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
@ -814,23 +814,24 @@
"value": null
},
{
"color": "green",
"value": 0
"color": "orange",
"value": 90
},
{
"color": "yellow",
"value": 1
"value": 93
},
{
"color": "orange",
"value": 3
"color": "green",
"value": 95
},
{
"color": "red",
"value": 5
"color": "blue",
"value": 100
}
]
},
"decimals": 0,
"mappings": [
{
"type": "value",
@ -862,10 +863,11 @@
"fields": [
"Value"
],
"order": "desc"
"order": "asc"
}
}
]
],
"description": "Percent of managed LOC-gated files at or under 500 lines. Older suite payloads fall back to 100%/0% until they emit platform_quality_gate_source_files_total."
},
{
"id": 500,
@ -981,7 +983,7 @@
{
"id": 13,
"type": "timeseries",
"title": "Coverage & LOC History (Selected Scope)",
"title": "Coverage & LOC Compliance History",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -1000,13 +1002,13 @@
},
{
"refId": "B",
"expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])",
"legendFormat": "{{suite}} files >500 LOC"
"expr": "(100 * clamp_min((max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))) - (max by (suite) (max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))), 0) / (max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])))) and on(suite) ((max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))) > 0) or on(suite) (100 * (1 - clamp_max((max by (suite) (max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))), 1))) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))",
"legendFormat": "{{suite}} files <=500 LOC %"
}
],
"fieldConfig": {
"defaults": {
"unit": "none"
"unit": "percent"
},
"overrides": []
},
@ -2612,7 +2614,7 @@
{
"id": 30,
"type": "bargauge",
"title": "Missing LOC Metrics by Suite",
"title": "Missing LOC Compliance Metrics by Suite",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -2625,7 +2627,7 @@
},
"targets": [
{
"expr": "sort_desc((((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"}))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\"))))",
"expr": "sort_desc((((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"}) and on(suite) count by (suite) (platform_quality_gate_source_files_total{exported_job=\"platform-quality-ci\"}))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\"))))",
"refId": "A",
"legendFormat": "{{suite}}",
"instant": true

View File

@ -788,7 +788,7 @@ data:
{
"id": 18,
"type": "bargauge",
"title": "Files >500 LOC by Suite (Latest)",
"title": "Files <=500 LOC by Suite (Latest)",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -801,7 +801,7 @@ data:
},
"targets": [
{
"expr": "sort_desc((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])))) - 1))",
"expr": "sort(((100 * clamp_min((max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) - (max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})), 0) / (max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}))) and on(suite) ((max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) > 0)) or on(suite) (100 * (1 - clamp_max((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})), 1))) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])))) - 1))",
"refId": "A",
"legendFormat": "{{suite}}",
"instant": true
@ -812,9 +812,9 @@ data:
"color": {
"mode": "thresholds"
},
"unit": "none",
"unit": "percent",
"min": 0,
"max": null,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
@ -823,23 +823,24 @@ data:
"value": null
},
{
"color": "green",
"value": 0
"color": "orange",
"value": 90
},
{
"color": "yellow",
"value": 1
"value": 93
},
{
"color": "orange",
"value": 3
"color": "green",
"value": 95
},
{
"color": "red",
"value": 5
"color": "blue",
"value": 100
}
]
},
"decimals": 0,
"mappings": [
{
"type": "value",
@ -871,10 +872,11 @@ data:
"fields": [
"Value"
],
"order": "desc"
"order": "asc"
}
}
]
],
"description": "Percent of managed LOC-gated files at or under 500 lines. Older suite payloads fall back to 100%/0% until they emit platform_quality_gate_source_files_total."
},
{
"id": 500,
@ -990,7 +992,7 @@ data:
{
"id": 13,
"type": "timeseries",
"title": "Coverage & LOC History (Selected Scope)",
"title": "Coverage & LOC Compliance History",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -1009,13 +1011,13 @@ data:
},
{
"refId": "B",
"expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])",
"legendFormat": "{{suite}} files >500 LOC"
"expr": "(100 * clamp_min((max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))) - (max by (suite) (max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))), 0) / (max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])))) and on(suite) ((max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))) > 0) or on(suite) (100 * (1 - clamp_max((max by (suite) (max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))), 1))) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))",
"legendFormat": "{{suite}} files <=500 LOC %"
}
],
"fieldConfig": {
"defaults": {
"unit": "none"
"unit": "percent"
},
"overrides": []
},
@ -2621,7 +2623,7 @@ data:
{
"id": 30,
"type": "bargauge",
"title": "Missing LOC Metrics by Suite",
"title": "Missing LOC Compliance Metrics by Suite",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -2634,7 +2636,7 @@ data:
},
"targets": [
{
"expr": "sort_desc((((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"}))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\"))))",
"expr": "sort_desc((((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"}) and on(suite) count by (suite) (platform_quality_gate_source_files_total{exported_job=\"platform-quality-ci\"}))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\"))))",
"refId": "A",
"legendFormat": "{{suite}}",
"instant": true

File diff suppressed because it is too large Load Diff

View File

@ -456,6 +456,9 @@ data:
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"unit": "none",
"min": 0,
"max": null,
@ -485,7 +488,7 @@ data:
"overrides": []
},
"options": {
"displayMode": "gradient",
"displayMode": "basic",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [

View File

@ -29,9 +29,39 @@ data:
},
"targets": [
{
"expr": "label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\") or label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{ups}} {{metric}}",
"expr": "max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)",
"legendFormat": "Pyrphoros Draw (W)",
"instant": true
},
{
"refId": "B",
"expr": "max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)",
"legendFormat": "Pyrphoros Discharge",
"instant": true
},
{
"refId": "C",
"expr": "max(ananke_ups_on_battery{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)",
"legendFormat": "Pyrphoros Status",
"instant": true
},
{
"refId": "D",
"expr": "max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)",
"legendFormat": "Statera Draw (W)",
"instant": true
},
{
"refId": "E",
"expr": "max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)",
"legendFormat": "Statera Discharge",
"instant": true
},
{
"refId": "F",
"expr": "max(ananke_ups_on_battery{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)",
"legendFormat": "Statera Status",
"instant": true
}
],
@ -63,25 +93,121 @@ data:
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": ".*Draw$"
"id": "byName",
"options": "Pyrphoros Draw (W)"
},
"properties": [
{
"id": "unit",
"value": "watt"
},
{
"id": "description",
"value": "Attached node: titan-db"
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": ".*Runtime$"
"id": "byName",
"options": "Statera Draw (W)"
},
"properties": [
{
"id": "unit",
"value": "watt"
},
{
"id": "description",
"value": "Attached node: titan-24"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pyrphoros Discharge"
},
"properties": [
{
"id": "unit",
"value": "s"
},
{
"id": "description",
"value": "Attached node: titan-db"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Statera Discharge"
},
"properties": [
{
"id": "unit",
"value": "s"
},
{
"id": "description",
"value": "Attached node: titan-24"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pyrphoros Status"
},
"properties": [
{
"id": "mappings",
"value": [
{
"type": "value",
"options": {
"0": {
"text": "\u26a1 Charging"
},
"1": {
"text": "\ud83d\udd0b Discharging"
}
}
}
]
},
{
"id": "description",
"value": "Attached node: titan-db"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Statera Status"
},
"properties": [
{
"id": "mappings",
"value": [
{
"type": "value",
"options": {
"0": {
"text": "\u26a1 Charging"
},
"1": {
"text": "\ud83d\udd0b Discharging"
}
}
}
]
},
{
"id": "description",
"value": "Attached node: titan-24"
}
]
}
@ -99,14 +225,10 @@ data:
"values": false
},
"textMode": "name_and_value",
"orientation": "vertical",
"wideLayout": false,
"text": {
"titleSize": 14,
"valueSize": 24
}
"orientation": "horizontal",
"wideLayout": true
},
"description": "Per-UPS live snapshot: draw, discharge runtime, and charging/discharging status."
"description": "Per-UPS live snapshot: current draw in watts, estimated battery runtime if discharge started now, and charging/discharging status."
},
{
"id": 2,
@ -167,9 +289,27 @@ data:
},
"targets": [
{
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32) or on() vector(0)), \"metric\", \"Temp \u00b0F\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{metric}}",
"expr": "max(typhon_temperature_celsius) or on() vector(0)",
"legendFormat": "Tent Temp (\u00b0C)",
"instant": true
},
{
"refId": "B",
"expr": "max(typhon_vpd_kpa) or on() vector(0)",
"legendFormat": "Tent VPD (kPa)",
"instant": true
},
{
"refId": "C",
"expr": "max(typhon_relative_humidity_percent) or on() vector(0)",
"legendFormat": "Tent RH (%)",
"instant": true
},
{
"refId": "D",
"expr": "max((243.12 * (ln(clamp_min(typhon_relative_humidity_percent, 1) / 100) + (17.62 * typhon_temperature_celsius) / (243.12 + typhon_temperature_celsius))) / (17.62 - (ln(clamp_min(typhon_relative_humidity_percent, 1) / 100) + (17.62 * typhon_temperature_celsius) / (243.12 + typhon_temperature_celsius)))) or on() vector(0)",
"legendFormat": "Dew Point (\u00b0C)",
"instant": true
}
],
@ -202,7 +342,7 @@ data:
{
"matcher": {
"id": "byName",
"options": "Temp \u00b0C"
"options": "Tent Temp (\u00b0C)"
},
"properties": [
{
@ -214,19 +354,19 @@ data:
{
"matcher": {
"id": "byName",
"options": "Temp \u00b0F"
"options": "Tent VPD (kPa)"
},
"properties": [
{
"id": "unit",
"value": "fahrenheit"
"value": "suffix:kPa"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Humidity"
"options": "Tent RH (%)"
},
"properties": [
{
@ -238,12 +378,12 @@ data:
{
"matcher": {
"id": "byName",
"options": "Pressure"
"options": "Dew Point (\u00b0C)"
},
"properties": [
{
"id": "unit",
"value": "suffix:kPa"
"value": "celsius"
}
]
}
@ -261,14 +401,10 @@ data:
"values": false
},
"textMode": "name_and_value",
"orientation": "vertical",
"wideLayout": false,
"text": {
"titleSize": 16,
"valueSize": 28
}
"orientation": "horizontal",
"wideLayout": true
},
"description": "Current tent values: Temp \u00b0C, Temp \u00b0F, Humidity, Pressure."
"description": "Current tent temperature, humidity, VPD, and dew point. These render once Typhon climate telemetry is online."
},
{
"id": 4,
@ -287,70 +423,30 @@ data:
"targets": [
{
"refId": "A",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)",
"expr": "typhon_temperature_celsius",
"legendFormat": "Temperature (\u00b0C)"
},
{
"refId": "B",
"expr": "(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32",
"legendFormat": "Temperature (\u00b0F)"
},
{
"refId": "C",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)",
"expr": "typhon_relative_humidity_percent",
"legendFormat": "Humidity (%)"
},
{
"refId": "C",
"expr": "typhon_vpd_kpa",
"legendFormat": "VPD (kPa)"
},
{
"refId": "D",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)",
"legendFormat": "Pressure (VPD kPa)"
"expr": "(243.12 * (ln(clamp_min(typhon_relative_humidity_percent, 1) / 100) + (17.62 * typhon_temperature_celsius) / (243.12 + typhon_temperature_celsius))) / (17.62 - (ln(clamp_min(typhon_relative_humidity_percent, 1) / 100) + (17.62 * typhon_temperature_celsius) / (243.12 + typhon_temperature_celsius)))",
"legendFormat": "Dew Point (\u00b0C)"
}
],
"fieldConfig": {
"defaults": {
"unit": "none"
"unit": "celsius"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Temperature (\u00b0C)"
},
"properties": [
{
"id": "unit",
"value": "suffix:\u00b0C"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
{
"matcher": {
"id": "byName",
"options": "Temperature (\u00b0F)"
},
"properties": [
{
"id": "unit",
"value": "suffix:\u00b0F"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
{
"matcher": {
"id": "byName",
@ -359,43 +455,31 @@ data:
"properties": [
{
"id": "unit",
"value": "suffix:%"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisPlacement",
"value": "right"
},
{
"id": "custom.axisCenteredZero",
"value": false
"value": "percent"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pressure (VPD kPa)"
"options": "VPD (kPa)"
},
"properties": [
{
"id": "unit",
"value": "suffix:kPa"
"value": "none"
},
{
"id": "custom.axisPlacement",
"value": "right"
},
{
"id": "decimals",
"value": 2
"id": "custom.axisLabel",
"value": "kPa"
},
{
"id": "custom.axisCenteredZero",
"value": false
"id": "decimals",
"value": 2
}
]
}
@ -410,7 +494,7 @@ data:
"mode": "multi"
}
},
"description": "Historical tent temperature (C/F), humidity, and pressure proxy (VPD kPa)."
"description": "Two-axis chart: tent temperature/humidity/dew point (left axis) and tent VPD in kPa (right axis)."
},
{
"id": 5,
@ -428,9 +512,27 @@ data:
},
"targets": [
{
"expr": "label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})) or on() vector(0))), \"metric\", \"Outlet\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})) or on() vector(0))), \"metric\", \"Inlet - In\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})) or on() vector(0))), \"metric\", \"Inlet - Out\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})) or on() vector(0))), \"metric\", \"Interior\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{metric}}",
"expr": "round(max(typhon_fan_speed_level{fan_group=\"outlet\"}) or on() vector(0))",
"legendFormat": "Inside Outlet",
"instant": true
},
{
"refId": "B",
"expr": "round(max(typhon_fan_speed_level{fan_group=\"inside_inlet\"}) or on() vector(0))",
"legendFormat": "Inside Inlet",
"instant": true
},
{
"refId": "C",
"expr": "round(max(typhon_fan_speed_level{fan_group=\"outside_inlet\"}) or on() vector(0))",
"legendFormat": "Outside Inlet",
"instant": true
},
{
"refId": "D",
"expr": "round(max(typhon_fan_speed_level{fan_group=\"interior\"}) or on() vector(0))",
"legendFormat": "Interior Fans",
"instant": true
}
],
@ -463,56 +565,7 @@ data:
},
"decimals": 0
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Outlet"
},
"properties": [
{
"id": "decimals",
"value": 0
}
]
},
{
"matcher": {
"id": "byName",
"options": "Inlet - In"
},
"properties": [
{
"id": "decimals",
"value": 0
}
]
},
{
"matcher": {
"id": "byName",
"options": "Inlet - Out"
},
"properties": [
{
"id": "decimals",
"value": 0
}
]
},
{
"matcher": {
"id": "byName",
"options": "Interior"
},
"properties": [
{
"id": "decimals",
"value": 0
}
]
}
]
"overrides": []
},
"options": {
"colorMode": "value",
@ -526,10 +579,10 @@ data:
"values": false
},
"textMode": "name_and_value",
"orientation": "vertical",
"wideLayout": false
"orientation": "horizontal",
"wideLayout": true
},
"description": "Current fan activity levels: outlet, inlet in, inlet out, interior (0-10)."
"description": "Current fan activity levels (0-10): inside outlet, inside inlet, outside inlet, and interior fans."
},
{
"id": 6,
@ -548,23 +601,23 @@ data:
"targets": [
{
"refId": "A",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})",
"legendFormat": "Outlet"
"expr": "typhon_fan_speed_level{fan_group=\"outlet\"}",
"legendFormat": "Inside Outlet"
},
{
"refId": "B",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})",
"legendFormat": "Inlet - Inside"
"expr": "typhon_fan_speed_level{fan_group=\"inside_inlet\"}",
"legendFormat": "Inside Inlet"
},
{
"refId": "C",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})",
"legendFormat": "Inlet - Outside"
"expr": "typhon_fan_speed_level{fan_group=\"outside_inlet\"}",
"legendFormat": "Outside Inlet"
},
{
"refId": "D",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})",
"legendFormat": "Interior"
"expr": "typhon_fan_speed_level{fan_group=\"interior\"}",
"legendFormat": "Interior Fans"
}
],
"fieldConfig": {

View File

@ -788,7 +788,7 @@ data:
{
"id": 18,
"type": "bargauge",
"title": "Files >500 LOC by Suite (Latest)",
"title": "Files <=500 LOC by Suite (Latest)",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -801,7 +801,7 @@ data:
},
"targets": [
{
"expr": "sort_desc((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])))) - 1))",
"expr": "sort(((100 * clamp_min((max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) - (max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})), 0) / (max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}))) and on(suite) ((max by (suite) (platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})) > 0)) or on(suite) (100 * (1 - clamp_max((max by (suite) (platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"})), 1))) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])))) - 1))",
"refId": "A",
"legendFormat": "{{suite}}",
"instant": true
@ -812,9 +812,9 @@ data:
"color": {
"mode": "thresholds"
},
"unit": "none",
"unit": "percent",
"min": 0,
"max": null,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
@ -823,23 +823,24 @@ data:
"value": null
},
{
"color": "green",
"value": 0
"color": "orange",
"value": 90
},
{
"color": "yellow",
"value": 1
"value": 93
},
{
"color": "orange",
"value": 3
"color": "green",
"value": 95
},
{
"color": "red",
"value": 5
"color": "blue",
"value": 100
}
]
},
"decimals": 0,
"mappings": [
{
"type": "value",
@ -871,10 +872,11 @@ data:
"fields": [
"Value"
],
"order": "desc"
"order": "asc"
}
}
]
],
"description": "Percent of managed LOC-gated files at or under 500 lines. Older suite payloads fall back to 100%/0% until they emit platform_quality_gate_source_files_total."
},
{
"id": 500,
@ -990,7 +992,7 @@ data:
{
"id": 13,
"type": "timeseries",
"title": "Coverage & LOC History (Selected Scope)",
"title": "Coverage & LOC Compliance History",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -1009,13 +1011,13 @@ data:
},
{
"refId": "B",
"expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])",
"legendFormat": "{{suite}} files >500 LOC"
"expr": "(100 * clamp_min((max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))) - (max by (suite) (max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))), 0) / (max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])))) and on(suite) ((max by (suite) (max_over_time(platform_quality_gate_source_files_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))) > 0) or on(suite) (100 * (1 - clamp_max((max by (suite) (max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval]))), 1))) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[30d])) >= bool 0)))",
"legendFormat": "{{suite}} files <=500 LOC %"
}
],
"fieldConfig": {
"defaults": {
"unit": "none"
"unit": "percent"
},
"overrides": []
},
@ -2621,7 +2623,7 @@ data:
{
"id": 30,
"type": "bargauge",
"title": "Missing LOC Metrics by Suite",
"title": "Missing LOC Compliance Metrics by Suite",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
@ -2634,7 +2636,7 @@ data:
},
"targets": [
{
"expr": "sort_desc((((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"}))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\"))))",
"expr": "sort_desc((((label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\")) unless on(suite) count by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"}) and on(suite) count by (suite) (platform_quality_gate_source_files_total{exported_job=\"platform-quality-ci\"}))) or on(suite) (0 * (label_replace(vector(1), \"suite\", \"ariadne\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"metis\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"ananke\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"atlasbot\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"pegasus\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"soteria\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"titan_iac\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"bstein_home\", \"__name__\", \".*\") or label_replace(vector(1), \"suite\", \"data_prepper\", \"__name__\", \".*\"))))",
"refId": "A",
"legendFormat": "{{suite}}",
"instant": true

View File

@ -23,6 +23,7 @@ from testing.quality_coverage import (
from testing.quality_docs import run_check as run_docs_check
from testing.quality_hygiene import (
count_files_over_line_limit,
count_files_with_line_limit,
run_check as run_hygiene_check,
)
@ -366,6 +367,7 @@ def run_profile(
"results": results,
"manual_scripts": contract.get("manual_scripts", []),
"workspace_line_coverage_percent": workspace_line_coverage_percent,
"source_files_total": count_files_with_line_limit(contract, root),
"source_lines_over_500": count_files_over_line_limit(contract, root),
}

View File

@ -51,3 +51,10 @@ def count_files_over_line_limit(contract: dict[str, Any], root: Path) -> int:
if line_count > max_lines:
count += 1
return count
def count_files_with_line_limit(contract: dict[str, Any], root: Path) -> int:
"""Return the number of managed files included in the LOC cap."""
config = contract.get("hygiene", {})
return len(_expand_globs(root, config.get("line_limit_globs", [])))