From a9c10ef2df361b4b21b711c9e42f53a9877f824e Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Thu, 15 Mar 2018 15:39:51 +0100 Subject: [PATCH] swarm/api: traces around trie getEntry --- swarm/api/api.go | 7 ++++--- swarm/api/manifest.go | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/swarm/api/api.go b/swarm/api/api.go index a39f2556a8..040aa4b4bb 100644 --- a/swarm/api/api.go +++ b/swarm/api/api.go @@ -251,7 +251,7 @@ type ErrResolve error // DNS Resolver func (self *Api) Resolve(uri *URI) (storage.Key, error) { apiResolveCount.Inc(1) - log.Trace(fmt.Sprintf("Resolving : %v", uri.Addr)) + log.Trace("resolving", "uri", uri.Addr) // if the URI is immutable, check if the address is a hash isHash := hashMatcher.MatchString(uri.Addr) @@ -308,7 +308,7 @@ func (self *Api) Put(content, contentType string) (k storage.Key, wait func(), e // to resolve basePath to content using dpa retrieve // it returns a section reader, mimeType, status and an error func (self *Api) Get(key storage.Key, path string) (reader storage.LazySectionReader, mimeType string, status int, err error) { - log.Debug("api.get", "key", key) + log.Debug("api.get", "key", key, "path", path) apiGetCount.Inc(1) trie, err := loadManifest(self.dpa, key, nil) if err != nil { @@ -318,8 +318,9 @@ func (self *Api) Get(key storage.Key, path string) (reader storage.LazySectionRe return } - log.Trace("trie.getentry", "key", key, "path", path) + log.Trace("trie getting entry", "key", key, "path", path) entry, _ := trie.getEntry(path) + log.Trace("trie got entry", "key", key, "path", path) if entry != nil { // we want to be able to serve Mutable Resource Updates transparently using the bzz:// scheme diff --git a/swarm/api/manifest.go b/swarm/api/manifest.go index 787df1764a..2f9771cbb9 100644 --- a/swarm/api/manifest.go +++ b/swarm/api/manifest.go @@ -436,7 +436,6 @@ func (self *manifestTrie) listWithPrefix(prefix string, quitC chan bool, cb func } func (self *manifestTrie) findPrefixOf(path string, quitC chan bool) (entry *manifestTrieEntry, pos int) { - log.Trace(fmt.Sprintf("findPrefixOf(%s)", path)) if len(path) == 0 {