GOGOGO
Jes Olson j3s@c3f.net
Wed, 14 Aug 2024 10:41:49 -0400
2 files changed,
5 insertions(+),
1 deletions(-)
M
reaper/reaper.go
→
reaper/reaper.go
@@ -79,12 +79,14 @@ go func() {
defer wg.Done() for f := range ch { + log.Println() + log.Printf("got feed %s from chan\n", f.UpdateURL) memBefore := getAlloc() start := time.Now() r.refreshFeed(f) memAfter := getAlloc() memUsed := memAfter - memBefore - log.Printf("memUsed: %dKB", memUsed/1024) + log.Printf("memUsed: %dKB\n", memUsed/1024) log.Printf("reaper: %s refreshed in %s\n", f.UpdateURL, time.Since(start)) } }()
M
rss/rss.go
→
rss/rss.go
@@ -5,6 +5,7 @@ "bytes"
"errors" "fmt" "io" + "log" "net" "net/http" "strings"@@ -152,6 +153,7 @@ if f.UpdateURL == "" {
return errors.New("feed has no URL") } + log.Printf("feed %s pre-items: %d\n", f.UpdateURL, len(f.Items)) if f.ItemMap == nil { f.ItemMap = make(map[string]struct{}) for _, item := range f.Items {