(self, node: dict[str, Any], total_value: float)
| 1408 | return tree |
| 1409 | |
| 1410 | def _annotate_stack_tree_share(self, node: dict[str, Any], total_value: float) -> None: |
| 1411 | current_value = float(node.get("value", 0.0)) |
| 1412 | share_percent = 0.0 if abs(total_value) < 1e-12 else (current_value / total_value) * 100.0 |
| 1413 | node["share_percent"] = share_percent |
| 1414 | for child in node.get("children", []): |
| 1415 | self._annotate_stack_tree_share(child, total_value) |
| 1416 | |
| 1417 | def _stack_tree_to_text(self, tree: dict[str, Any]) -> str: |
| 1418 | lines = [f"{_stack_node_name(tree)} {_format_stack_summary(tree)}"] |
no outgoing calls
no test coverage detected