MCPcopy Create free account
hub / github.com/adny-code/fastgrind / _new_stack_tree_node

Method _new_stack_tree_node

tools/fastgrind.py:1373–1384  ·  view source on GitHub ↗
(self, function_id: int)

Source from the content-addressed store, hash-verified

1371 return sampled_ticks, sampled_series
1372
1373 def _new_stack_tree_node(self, function_id: int) -> dict[str, Any]:
1374 display_name = self.reader.display_names[function_id] or self.reader.function_names[function_id] or str(function_id)
1375 canonical_name = self.reader.function_names[function_id] or display_name
1376 return {
1377 "thread_id": None,
1378 "function_id": function_id,
1379 "display_name": display_name,
1380 "canonical_name": canonical_name,
1381 "malloc": 0.0,
1382 "free": 0.0,
1383 "children": {},
1384 }
1385
1386 def _finalize_stack_tree(self, node: dict[str, Any], metric: str) -> dict[str, Any]:
1387 sort_metric = "net" if metric == "live" else metric

Callers 1

stack_treeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected