fix: repair hotspot evidence formatting
This commit is contained in:
parent
a6b70e00a0
commit
4e45e1985d
@ -1245,12 +1245,12 @@ def _hotspot_evidence(summary: dict[str, Any]) -> list[str]:
|
|||||||
ns_parts = []
|
ns_parts = []
|
||||||
for entry in ns_map.get(node, [])[:3]:
|
for entry in ns_map.get(node, [])[:3]:
|
||||||
if isinstance(entry, (list, tuple)) and len(entry) >= 2:
|
if isinstance(entry, (list, tuple)) and len(entry) >= 2:
|
||||||
ns_parts.append(f\"{entry[0]}={entry[1]}\")
|
ns_parts.append(f"{entry[0]}={entry[1]}")
|
||||||
ns_text = \", \".join(ns_parts)
|
ns_text = ", ".join(ns_parts)
|
||||||
value_text = f\"{value:.2f}\" if isinstance(value, (int, float)) else str(value)
|
value_text = f"{value:.2f}" if isinstance(value, (int, float)) else str(value)
|
||||||
line = f\"hotspot.{metric}: node={node} class={node_class or 'unknown'} value={value_text}\"
|
line = f"hotspot.{metric}: node={node} class={node_class or 'unknown'} value={value_text}"
|
||||||
if ns_text:
|
if ns_text:
|
||||||
line += f\" namespaces_top={ns_text}\"
|
line += f" namespaces_top={ns_text}"
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
return lines
|
return lines
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user