MCPcopy Create free account
hub / github.com/Snapchat/dagger-browser / computeNodeWeight

Method computeNodeWeight

browser/src/models/GraphManager.tsx:183–189  ·  view source on GitHub ↗
(componentName: string, key: string, graphReducer: GraphReducer)

Source from the content-addressed store, hash-verified

181 }
182
183 computeNodeWeight(componentName: string, key: string, graphReducer: GraphReducer): Weight {
184 const node = this.getNode(componentName, key);
185 if (node) {
186 return this.computeWeightForNodes(componentName, [node], graphReducer);
187 }
188 return graphReducer.result();
189 }
190
191 /** Computes weight for a list of nodes, aggregating and returning result from graph reducer. */
192 computeWeightForNodes(componentName: string, queue: Node[], graphReducer: GraphReducer): Weight {

Callers 2

getWeightMethod · 0.80
getWeightMethod · 0.80

Calls 3

getNodeMethod · 0.95
computeWeightForNodesMethod · 0.95
resultMethod · 0.65

Tested by

no test coverage detected