MCPcopy Create free account
hub / github.com/google/gapid / stateTreeNodePath

Function stateTreeNodePath

gapis/resolve/state_tree.go:142–155  ·  view source on GitHub ↗
(ctx context.Context, tree *stateTree, p path.Node)

Source from the content-addressed store, hash-verified

140}
141
142func stateTreeNodePath(ctx context.Context, tree *stateTree, p path.Node) ([]uint64, error) {
143 n := tree.root
144 indices := []uint64{}
145 for {
146 ci := n.findByPath(ctx, p, tree)
147 if ci == nil {
148 break
149 }
150 for _, i := range ci {
151 n, indices = n.children[i], append(indices, i)
152 }
153 }
154 return indices, nil
155}
156
157type errIndexOOB struct {
158 idx, count uint64

Callers 2

StateTreeNodeForPathFunction · 0.85
TestStateTreeNodeFunction · 0.85

Calls 1

findByPathMethod · 0.80

Tested by 1

TestStateTreeNodeFunction · 0.68