MCPcopy Index your code
hub / github.com/nodejs/node / LoadEdges

Function LoadEdges

tools/gyp/tools/graphviz.py:22–40  ·  view source on GitHub ↗

Load the edges map from the dump file, and filter it to only show targets in |targets| and their depedendents.

(filename, targets)

Source from the content-addressed store, hash-verified

20
21
22def LoadEdges(filename, targets):
23 """Load the edges map from the dump file, and filter it to only
24 show targets in |targets| and their depedendents."""
25
26 file = open("dump.json")
27 edges = json.load(file)
28 file.close()
29
30 # Copy out only the edges we're interested in from the full edge list.
31 target_edges = {}
32 to_visit = targets[:]
33 while to_visit:
34 src = to_visit.pop()
35 if src in target_edges:
36 continue
37 target_edges[src] = edges[src]
38 to_visit.extend(edges[src])
39
40 return target_edges
41
42
43def WriteGraph(edges):

Callers 1

mainFunction · 0.85

Calls 5

popMethod · 0.80
closeMethod · 0.65
openFunction · 0.50
loadMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…