Home / Function/ getNodeMaxCost() — supabase Function Reference

getNodeMaxCost() — supabase Function Reference

Architecture documentation for the getNodeMaxCost() function in ExplainVisualizer.parser.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  f80609f4_a3b7_2347_506c_33348ffad00b["getNodeMaxCost()"]
  7e39cbac_3c85_4268_da97_07916095311d["calculateMaxCost()"]
  7e39cbac_3c85_4268_da97_07916095311d -->|calls| f80609f4_a3b7_2347_506c_33348ffad00b
  style f80609f4_a3b7_2347_506c_33348ffad00b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/ExplainVisualizer/ExplainVisualizer.parser.ts lines 221–225

function getNodeMaxCost(node: ExplainNode): number {
  const nodeCost = node.cost?.end || node.actualTime?.end || 0
  const childrenMax = node.children.reduce((max, child) => Math.max(max, getNodeMaxCost(child)), 0)
  return Math.max(nodeCost, childrenMax)
}

Subdomains

Called By

Frequently Asked Questions

What does getNodeMaxCost() do?
getNodeMaxCost() is a function in the supabase codebase.
What calls getNodeMaxCost()?
getNodeMaxCost() is called by 1 function(s): calculateMaxCost.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free