Commit cd26e8c3 authored by Forrest Weston's avatar Forrest Weston Committed by ForrestWeston

Add event logging around path resolution

License: MIT
Signed-off-by: default avatarForrest Weston <forrest@protocol.ai>
parent 5f825db8
...@@ -135,6 +135,7 @@ func (s *Resolver) ResolvePathComponents(ctx context.Context, fpath Path) ([]nod ...@@ -135,6 +135,7 @@ func (s *Resolver) ResolvePathComponents(ctx context.Context, fpath Path) ([]nod
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer log.EventBegin(ctx, "resolvePathComponents", logging.LoggableMap{"parts": parts, "cid": h}).Done()
log.Debug("resolve dag get") log.Debug("resolve dag get")
nd, err := s.DAG.Get(ctx, h) nd, err := s.DAG.Get(ctx, h)
...@@ -154,6 +155,7 @@ func (s *Resolver) ResolvePathComponents(ctx context.Context, fpath Path) ([]nod ...@@ -154,6 +155,7 @@ func (s *Resolver) ResolvePathComponents(ctx context.Context, fpath Path) ([]nod
// would retrieve "baz" in ("bar" in ("foo" in nd.Links).Links).Links // would retrieve "baz" in ("bar" in ("foo" in nd.Links).Links).Links
func (s *Resolver) ResolveLinks(ctx context.Context, ndd node.Node, names []string) ([]node.Node, error) { func (s *Resolver) ResolveLinks(ctx context.Context, ndd node.Node, names []string) ([]node.Node, error) {
defer log.EventBegin(ctx, "resolveLinks", logging.LoggableMap{"names": names}).Done()
result := make([]node.Node, 0, len(names)+1) result := make([]node.Node, 0, len(names)+1)
result = append(result, ndd) result = append(result, ndd)
nd := ndd // dup arg workaround nd := ndd // dup arg workaround
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment