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

View File

@ -1284,7 +1284,7 @@ def bargauge_panel(
"overrides": [], "overrides": [],
}, },
"options": { "options": {
"displayMode": "gradient", "displayMode": "basic",
"orientation": "horizontal", "orientation": "horizontal",
"reduceOptions": { "reduceOptions": {
"calcs": ["lastNotNull"], "calcs": ["lastNotNull"],
@ -3153,9 +3153,31 @@ def build_jobs_dashboard():
) )
coverage_gap = f"clamp_min(95 - ({coverage_by_suite}), 0)" 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}}})' 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 = ( smell_with_missing = (
f"({smell_by_suite}) or on(suite) ((0 * (sum by (suite) (increase(platform_quality_gate_runs_total{{{runs_selector}}}[30d])))) - 1)" 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))" 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))' 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}}})" f"count by (suite) (platform_quality_gate_workspace_line_coverage_percent{{{exported}}})"
) )
missing_loc_by_suite = _missing_suite_series( 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( missing_test_case_by_suite = _missing_suite_series(
f"count by (suite) (platform_quality_gate_test_case_result{{{exported}}})" f"count by (suite) (platform_quality_gate_test_case_result{{{exported}}})"
@ -3461,10 +3484,10 @@ def build_jobs_dashboard():
panels.append( panels.append(
timeseries_panel( timeseries_panel(
13, 13,
"Coverage & LOC History (Selected Scope)", "Coverage & LOC Compliance History",
None, None,
{"h": 8, "w": 8, "x": 8, "y": 21}, {"h": 8, "w": 8, "x": 8, "y": 21},
unit="none", unit="percent",
targets=[ targets=[
{ {
"refId": "A", "refId": "A",
@ -3473,8 +3496,8 @@ def build_jobs_dashboard():
}, },
{ {
"refId": "B", "refId": "B",
"expr": f'max_over_time(platform_quality_gate_source_lines_over_500_total{{{smell_selector}}}[$__interval])', "expr": loc_limit_compliance_history,
"legendFormat": "{{suite}} files >500 LOC", "legendFormat": "{{suite}} files <=500 LOC %",
}, },
], ],
legend_display="list", legend_display="list",
@ -3623,18 +3646,20 @@ def build_jobs_dashboard():
smell_panel = bargauge_panel( smell_panel = bargauge_panel(
18, 18,
"Files >500 LOC by Suite (Latest)", "Files <=500 LOC by Suite (Latest)",
smell_with_missing, loc_limit_compliance_with_missing,
{"h": 8, "w": 12, "x": 12, "y": 73}, {"h": 8, "w": 12, "x": 12, "y": 73},
unit="none", unit="percent",
instant=True, instant=True,
legend="{{suite}}", legend="{{suite}}",
sort_order="desc", sort_order="asc",
thresholds=smell_thresholds, thresholds=success_thresholds,
decimals=0,
) )
smell_panel["fieldConfig"]["defaults"]["mappings"] = [ smell_panel["fieldConfig"]["defaults"]["mappings"] = [
{"type": "value", "options": {"-1": {"text": "missing"}}} {"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(smell_panel)
panels.append( panels.append(
@ -3682,7 +3707,7 @@ def build_jobs_dashboard():
panels.append( panels.append(
bargauge_panel( bargauge_panel(
30, 30,
"Missing LOC Metrics by Suite", "Missing LOC Compliance Metrics by Suite",
missing_loc_by_suite, missing_loc_by_suite,
{"h": 7, "w": 6, "x": 18, "y": 81}, {"h": 7, "w": 6, "x": 18, "y": 81},
unit="none", 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 # 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. # non-applicable coverage so rollups do not confuse N/A with uncovered code.
platform_quality_gate_workspace_line_coverage_percent{suite="${suite}"} 100 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 # TYPE platform_quality_gate_source_lines_over_500_total gauge
platform_quality_gate_source_lines_over_500_total{suite="${suite}"} 0 platform_quality_gate_source_lines_over_500_total{suite="${suite}"} 0
# TYPE platform_quality_gate_build_info gauge # TYPE platform_quality_gate_build_info gauge

View File

@ -779,7 +779,7 @@
{ {
"id": 18, "id": 18,
"type": "bargauge", "type": "bargauge",
"title": "Files >500 LOC by Suite (Latest)", "title": "Files <=500 LOC by Suite (Latest)",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -792,7 +792,7 @@
}, },
"targets": [ "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", "refId": "A",
"legendFormat": "{{suite}}", "legendFormat": "{{suite}}",
"instant": true "instant": true
@ -803,9 +803,9 @@
"color": { "color": {
"mode": "thresholds" "mode": "thresholds"
}, },
"unit": "none", "unit": "percent",
"min": 0, "min": 0,
"max": null, "max": 100,
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
@ -814,23 +814,24 @@
"value": null "value": null
}, },
{ {
"color": "green", "color": "orange",
"value": 0 "value": 90
}, },
{ {
"color": "yellow", "color": "yellow",
"value": 1 "value": 93
}, },
{ {
"color": "orange", "color": "green",
"value": 3 "value": 95
}, },
{ {
"color": "red", "color": "blue",
"value": 5 "value": 100
} }
] ]
}, },
"decimals": 0,
"mappings": [ "mappings": [
{ {
"type": "value", "type": "value",
@ -862,10 +863,11 @@
"fields": [ "fields": [
"Value" "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, "id": 500,
@ -981,7 +983,7 @@
{ {
"id": 13, "id": 13,
"type": "timeseries", "type": "timeseries",
"title": "Coverage & LOC History (Selected Scope)", "title": "Coverage & LOC Compliance History",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -1000,13 +1002,13 @@
}, },
{ {
"refId": "B", "refId": "B",
"expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])", "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" "legendFormat": "{{suite}} files <=500 LOC %"
} }
], ],
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"unit": "none" "unit": "percent"
}, },
"overrides": [] "overrides": []
}, },
@ -2612,7 +2614,7 @@
{ {
"id": 30, "id": 30,
"type": "bargauge", "type": "bargauge",
"title": "Missing LOC Metrics by Suite", "title": "Missing LOC Compliance Metrics by Suite",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -2625,7 +2627,7 @@
}, },
"targets": [ "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", "refId": "A",
"legendFormat": "{{suite}}", "legendFormat": "{{suite}}",
"instant": true "instant": true

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -20,9 +20,39 @@
}, },
"targets": [ "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", "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 "instant": true
} }
], ],
@ -54,25 +84,121 @@
"overrides": [ "overrides": [
{ {
"matcher": { "matcher": {
"id": "byRegexp", "id": "byName",
"options": ".*Draw$" "options": "Pyrphoros Draw (W)"
}, },
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "watt" "value": "watt"
},
{
"id": "description",
"value": "Attached node: titan-db"
} }
] ]
}, },
{ {
"matcher": { "matcher": {
"id": "byRegexp", "id": "byName",
"options": ".*Runtime$" "options": "Statera Draw (W)"
},
"properties": [
{
"id": "unit",
"value": "watt"
},
{
"id": "description",
"value": "Attached node: titan-24"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pyrphoros Discharge"
}, },
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "s" "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 "values": false
}, },
"textMode": "name_and_value", "textMode": "name_and_value",
"orientation": "vertical", "orientation": "horizontal",
"wideLayout": false, "wideLayout": true
"text": {
"titleSize": 14,
"valueSize": 24
}
}, },
"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, "id": 2,
@ -158,9 +280,27 @@
}, },
"targets": [ "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", "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 "instant": true
} }
], ],
@ -193,7 +333,7 @@
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "Temp \u00b0C" "options": "Tent Temp (\u00b0C)"
}, },
"properties": [ "properties": [
{ {
@ -205,19 +345,19 @@
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "Temp \u00b0F" "options": "Tent VPD (kPa)"
}, },
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "fahrenheit" "value": "suffix:kPa"
} }
] ]
}, },
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "Humidity" "options": "Tent RH (%)"
}, },
"properties": [ "properties": [
{ {
@ -229,12 +369,12 @@
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "Pressure" "options": "Dew Point (\u00b0C)"
}, },
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "suffix:kPa" "value": "celsius"
} }
] ]
} }
@ -252,14 +392,10 @@
"values": false "values": false
}, },
"textMode": "name_and_value", "textMode": "name_and_value",
"orientation": "vertical", "orientation": "horizontal",
"wideLayout": false, "wideLayout": true
"text": {
"titleSize": 16,
"valueSize": 28
}
}, },
"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, "id": 4,
@ -278,70 +414,30 @@
"targets": [ "targets": [
{ {
"refId": "A", "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)" "legendFormat": "Temperature (\u00b0C)"
}, },
{ {
"refId": "B", "refId": "B",
"expr": "(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32", "expr": "typhon_relative_humidity_percent",
"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)",
"legendFormat": "Humidity (%)" "legendFormat": "Humidity (%)"
}, },
{
"refId": "C",
"expr": "typhon_vpd_kpa",
"legendFormat": "VPD (kPa)"
},
{ {
"refId": "D", "refId": "D",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)", "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": "Pressure (VPD kPa)" "legendFormat": "Dew Point (\u00b0C)"
} }
], ],
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"unit": "none" "unit": "celsius"
}, },
"overrides": [ "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": { "matcher": {
"id": "byName", "id": "byName",
@ -350,43 +446,31 @@
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "suffix:%" "value": "percent"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisPlacement",
"value": "right"
},
{
"id": "custom.axisCenteredZero",
"value": false
} }
] ]
}, },
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "Pressure (VPD kPa)" "options": "VPD (kPa)"
}, },
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "suffix:kPa" "value": "none"
}, },
{ {
"id": "custom.axisPlacement", "id": "custom.axisPlacement",
"value": "right" "value": "right"
}, },
{ {
"id": "decimals", "id": "custom.axisLabel",
"value": 2 "value": "kPa"
}, },
{ {
"id": "custom.axisCenteredZero", "id": "decimals",
"value": false "value": 2
} }
] ]
} }
@ -401,7 +485,7 @@
"mode": "multi" "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, "id": 5,
@ -419,9 +503,27 @@
}, },
"targets": [ "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", "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 "instant": true
} }
], ],
@ -454,56 +556,7 @@
}, },
"decimals": 0 "decimals": 0
}, },
"overrides": [ "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
}
]
}
]
}, },
"options": { "options": {
"colorMode": "value", "colorMode": "value",
@ -517,10 +570,10 @@
"values": false "values": false
}, },
"textMode": "name_and_value", "textMode": "name_and_value",
"orientation": "vertical", "orientation": "horizontal",
"wideLayout": false "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, "id": 6,
@ -539,23 +592,23 @@
"targets": [ "targets": [
{ {
"refId": "A", "refId": "A",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})", "expr": "typhon_fan_speed_level{fan_group=\"outlet\"}",
"legendFormat": "Outlet" "legendFormat": "Inside Outlet"
}, },
{ {
"refId": "B", "refId": "B",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})", "expr": "typhon_fan_speed_level{fan_group=\"inside_inlet\"}",
"legendFormat": "Inlet - Inside" "legendFormat": "Inside Inlet"
}, },
{ {
"refId": "C", "refId": "C",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})", "expr": "typhon_fan_speed_level{fan_group=\"outside_inlet\"}",
"legendFormat": "Inlet - Outside" "legendFormat": "Outside Inlet"
}, },
{ {
"refId": "D", "refId": "D",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})", "expr": "typhon_fan_speed_level{fan_group=\"interior\"}",
"legendFormat": "Interior" "legendFormat": "Interior Fans"
} }
], ],
"fieldConfig": { "fieldConfig": {

View File

@ -779,7 +779,7 @@
{ {
"id": 18, "id": 18,
"type": "bargauge", "type": "bargauge",
"title": "Files >500 LOC by Suite (Latest)", "title": "Files <=500 LOC by Suite (Latest)",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -792,7 +792,7 @@
}, },
"targets": [ "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", "refId": "A",
"legendFormat": "{{suite}}", "legendFormat": "{{suite}}",
"instant": true "instant": true
@ -803,9 +803,9 @@
"color": { "color": {
"mode": "thresholds" "mode": "thresholds"
}, },
"unit": "none", "unit": "percent",
"min": 0, "min": 0,
"max": null, "max": 100,
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
@ -814,23 +814,24 @@
"value": null "value": null
}, },
{ {
"color": "green", "color": "orange",
"value": 0 "value": 90
}, },
{ {
"color": "yellow", "color": "yellow",
"value": 1 "value": 93
}, },
{ {
"color": "orange", "color": "green",
"value": 3 "value": 95
}, },
{ {
"color": "red", "color": "blue",
"value": 5 "value": 100
} }
] ]
}, },
"decimals": 0,
"mappings": [ "mappings": [
{ {
"type": "value", "type": "value",
@ -862,10 +863,11 @@
"fields": [ "fields": [
"Value" "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, "id": 500,
@ -981,7 +983,7 @@
{ {
"id": 13, "id": 13,
"type": "timeseries", "type": "timeseries",
"title": "Coverage & LOC History (Selected Scope)", "title": "Coverage & LOC Compliance History",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -1000,13 +1002,13 @@
}, },
{ {
"refId": "B", "refId": "B",
"expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])", "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" "legendFormat": "{{suite}} files <=500 LOC %"
} }
], ],
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"unit": "none" "unit": "percent"
}, },
"overrides": [] "overrides": []
}, },
@ -2612,7 +2614,7 @@
{ {
"id": 30, "id": 30,
"type": "bargauge", "type": "bargauge",
"title": "Missing LOC Metrics by Suite", "title": "Missing LOC Compliance Metrics by Suite",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -2625,7 +2627,7 @@
}, },
"targets": [ "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", "refId": "A",
"legendFormat": "{{suite}}", "legendFormat": "{{suite}}",
"instant": true "instant": true

View File

@ -788,7 +788,7 @@ data:
{ {
"id": 18, "id": 18,
"type": "bargauge", "type": "bargauge",
"title": "Files >500 LOC by Suite (Latest)", "title": "Files <=500 LOC by Suite (Latest)",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -801,7 +801,7 @@ data:
}, },
"targets": [ "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", "refId": "A",
"legendFormat": "{{suite}}", "legendFormat": "{{suite}}",
"instant": true "instant": true
@ -812,9 +812,9 @@ data:
"color": { "color": {
"mode": "thresholds" "mode": "thresholds"
}, },
"unit": "none", "unit": "percent",
"min": 0, "min": 0,
"max": null, "max": 100,
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
@ -823,23 +823,24 @@ data:
"value": null "value": null
}, },
{ {
"color": "green", "color": "orange",
"value": 0 "value": 90
}, },
{ {
"color": "yellow", "color": "yellow",
"value": 1 "value": 93
}, },
{ {
"color": "orange", "color": "green",
"value": 3 "value": 95
}, },
{ {
"color": "red", "color": "blue",
"value": 5 "value": 100
} }
] ]
}, },
"decimals": 0,
"mappings": [ "mappings": [
{ {
"type": "value", "type": "value",
@ -871,10 +872,11 @@ data:
"fields": [ "fields": [
"Value" "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, "id": 500,
@ -990,7 +992,7 @@ data:
{ {
"id": 13, "id": 13,
"type": "timeseries", "type": "timeseries",
"title": "Coverage & LOC History (Selected Scope)", "title": "Coverage & LOC Compliance History",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -1009,13 +1011,13 @@ data:
}, },
{ {
"refId": "B", "refId": "B",
"expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])", "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" "legendFormat": "{{suite}} files <=500 LOC %"
} }
], ],
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"unit": "none" "unit": "percent"
}, },
"overrides": [] "overrides": []
}, },
@ -2621,7 +2623,7 @@ data:
{ {
"id": 30, "id": 30,
"type": "bargauge", "type": "bargauge",
"title": "Missing LOC Metrics by Suite", "title": "Missing LOC Compliance Metrics by Suite",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -2634,7 +2636,7 @@ data:
}, },
"targets": [ "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", "refId": "A",
"legendFormat": "{{suite}}", "legendFormat": "{{suite}}",
"instant": true "instant": true

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -29,9 +29,39 @@ data:
}, },
"targets": [ "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", "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 "instant": true
} }
], ],
@ -63,25 +93,121 @@ data:
"overrides": [ "overrides": [
{ {
"matcher": { "matcher": {
"id": "byRegexp", "id": "byName",
"options": ".*Draw$" "options": "Pyrphoros Draw (W)"
}, },
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "watt" "value": "watt"
},
{
"id": "description",
"value": "Attached node: titan-db"
} }
] ]
}, },
{ {
"matcher": { "matcher": {
"id": "byRegexp", "id": "byName",
"options": ".*Runtime$" "options": "Statera Draw (W)"
},
"properties": [
{
"id": "unit",
"value": "watt"
},
{
"id": "description",
"value": "Attached node: titan-24"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pyrphoros Discharge"
}, },
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "s" "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 "values": false
}, },
"textMode": "name_and_value", "textMode": "name_and_value",
"orientation": "vertical", "orientation": "horizontal",
"wideLayout": false, "wideLayout": true
"text": {
"titleSize": 14,
"valueSize": 24
}
}, },
"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, "id": 2,
@ -167,9 +289,27 @@ data:
}, },
"targets": [ "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", "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 "instant": true
} }
], ],
@ -202,7 +342,7 @@ data:
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "Temp \u00b0C" "options": "Tent Temp (\u00b0C)"
}, },
"properties": [ "properties": [
{ {
@ -214,19 +354,19 @@ data:
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "Temp \u00b0F" "options": "Tent VPD (kPa)"
}, },
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "fahrenheit" "value": "suffix:kPa"
} }
] ]
}, },
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "Humidity" "options": "Tent RH (%)"
}, },
"properties": [ "properties": [
{ {
@ -238,12 +378,12 @@ data:
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "Pressure" "options": "Dew Point (\u00b0C)"
}, },
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "suffix:kPa" "value": "celsius"
} }
] ]
} }
@ -261,14 +401,10 @@ data:
"values": false "values": false
}, },
"textMode": "name_and_value", "textMode": "name_and_value",
"orientation": "vertical", "orientation": "horizontal",
"wideLayout": false, "wideLayout": true
"text": {
"titleSize": 16,
"valueSize": 28
}
}, },
"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, "id": 4,
@ -287,70 +423,30 @@ data:
"targets": [ "targets": [
{ {
"refId": "A", "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)" "legendFormat": "Temperature (\u00b0C)"
}, },
{ {
"refId": "B", "refId": "B",
"expr": "(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32", "expr": "typhon_relative_humidity_percent",
"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)",
"legendFormat": "Humidity (%)" "legendFormat": "Humidity (%)"
}, },
{
"refId": "C",
"expr": "typhon_vpd_kpa",
"legendFormat": "VPD (kPa)"
},
{ {
"refId": "D", "refId": "D",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)", "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": "Pressure (VPD kPa)" "legendFormat": "Dew Point (\u00b0C)"
} }
], ],
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"unit": "none" "unit": "celsius"
}, },
"overrides": [ "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": { "matcher": {
"id": "byName", "id": "byName",
@ -359,43 +455,31 @@ data:
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "suffix:%" "value": "percent"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisPlacement",
"value": "right"
},
{
"id": "custom.axisCenteredZero",
"value": false
} }
] ]
}, },
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "Pressure (VPD kPa)" "options": "VPD (kPa)"
}, },
"properties": [ "properties": [
{ {
"id": "unit", "id": "unit",
"value": "suffix:kPa" "value": "none"
}, },
{ {
"id": "custom.axisPlacement", "id": "custom.axisPlacement",
"value": "right" "value": "right"
}, },
{ {
"id": "decimals", "id": "custom.axisLabel",
"value": 2 "value": "kPa"
}, },
{ {
"id": "custom.axisCenteredZero", "id": "decimals",
"value": false "value": 2
} }
] ]
} }
@ -410,7 +494,7 @@ data:
"mode": "multi" "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, "id": 5,
@ -428,9 +512,27 @@ data:
}, },
"targets": [ "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", "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 "instant": true
} }
], ],
@ -463,56 +565,7 @@ data:
}, },
"decimals": 0 "decimals": 0
}, },
"overrides": [ "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
}
]
}
]
}, },
"options": { "options": {
"colorMode": "value", "colorMode": "value",
@ -526,10 +579,10 @@ data:
"values": false "values": false
}, },
"textMode": "name_and_value", "textMode": "name_and_value",
"orientation": "vertical", "orientation": "horizontal",
"wideLayout": false "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, "id": 6,
@ -548,23 +601,23 @@ data:
"targets": [ "targets": [
{ {
"refId": "A", "refId": "A",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})", "expr": "typhon_fan_speed_level{fan_group=\"outlet\"}",
"legendFormat": "Outlet" "legendFormat": "Inside Outlet"
}, },
{ {
"refId": "B", "refId": "B",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})", "expr": "typhon_fan_speed_level{fan_group=\"inside_inlet\"}",
"legendFormat": "Inlet - Inside" "legendFormat": "Inside Inlet"
}, },
{ {
"refId": "C", "refId": "C",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})", "expr": "typhon_fan_speed_level{fan_group=\"outside_inlet\"}",
"legendFormat": "Inlet - Outside" "legendFormat": "Outside Inlet"
}, },
{ {
"refId": "D", "refId": "D",
"expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})", "expr": "typhon_fan_speed_level{fan_group=\"interior\"}",
"legendFormat": "Interior" "legendFormat": "Interior Fans"
} }
], ],
"fieldConfig": { "fieldConfig": {

View File

@ -788,7 +788,7 @@ data:
{ {
"id": 18, "id": 18,
"type": "bargauge", "type": "bargauge",
"title": "Files >500 LOC by Suite (Latest)", "title": "Files <=500 LOC by Suite (Latest)",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -801,7 +801,7 @@ data:
}, },
"targets": [ "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", "refId": "A",
"legendFormat": "{{suite}}", "legendFormat": "{{suite}}",
"instant": true "instant": true
@ -812,9 +812,9 @@ data:
"color": { "color": {
"mode": "thresholds" "mode": "thresholds"
}, },
"unit": "none", "unit": "percent",
"min": 0, "min": 0,
"max": null, "max": 100,
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
@ -823,23 +823,24 @@ data:
"value": null "value": null
}, },
{ {
"color": "green", "color": "orange",
"value": 0 "value": 90
}, },
{ {
"color": "yellow", "color": "yellow",
"value": 1 "value": 93
}, },
{ {
"color": "orange", "color": "green",
"value": 3 "value": 95
}, },
{ {
"color": "red", "color": "blue",
"value": 5 "value": 100
} }
] ]
}, },
"decimals": 0,
"mappings": [ "mappings": [
{ {
"type": "value", "type": "value",
@ -871,10 +872,11 @@ data:
"fields": [ "fields": [
"Value" "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, "id": 500,
@ -990,7 +992,7 @@ data:
{ {
"id": 13, "id": 13,
"type": "timeseries", "type": "timeseries",
"title": "Coverage & LOC History (Selected Scope)", "title": "Coverage & LOC Compliance History",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -1009,13 +1011,13 @@ data:
}, },
{ {
"refId": "B", "refId": "B",
"expr": "max_over_time(platform_quality_gate_source_lines_over_500_total{suite=~\"${suite:regex}\",exported_job=\"platform-quality-ci\"}[$__interval])", "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" "legendFormat": "{{suite}} files <=500 LOC %"
} }
], ],
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"unit": "none" "unit": "percent"
}, },
"overrides": [] "overrides": []
}, },
@ -2621,7 +2623,7 @@ data:
{ {
"id": 30, "id": 30,
"type": "bargauge", "type": "bargauge",
"title": "Missing LOC Metrics by Suite", "title": "Missing LOC Compliance Metrics by Suite",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "atlas-vm" "uid": "atlas-vm"
@ -2634,7 +2636,7 @@ data:
}, },
"targets": [ "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", "refId": "A",
"legendFormat": "{{suite}}", "legendFormat": "{{suite}}",
"instant": true "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_docs import run_check as run_docs_check
from testing.quality_hygiene import ( from testing.quality_hygiene import (
count_files_over_line_limit, count_files_over_line_limit,
count_files_with_line_limit,
run_check as run_hygiene_check, run_check as run_hygiene_check,
) )
@ -366,6 +367,7 @@ def run_profile(
"results": results, "results": results,
"manual_scripts": contract.get("manual_scripts", []), "manual_scripts": contract.get("manual_scripts", []),
"workspace_line_coverage_percent": workspace_line_coverage_percent, "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), "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: if line_count > max_lines:
count += 1 count += 1
return count 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", [])))