diff --git a/content/reponode.go b/content/reponode.go index faf9e79..39f45fd 100644 --- a/content/reponode.go +++ b/content/reponode.go @@ -22,13 +22,13 @@ type RepoNode struct { // published from - to is going to be an array of fromTos } -// NewRepoNode constructor -func NewRepoNode() *RepoNode { - return &RepoNode{ - Data: make(map[string]interface{}), - Nodes: make(map[string]*RepoNode), - } -} +// // NewRepoNode constructor +// func NewRepoNode() *RepoNode { +// return &RepoNode{ +// Data: make(map[string]interface{}, 0), // set initial size to zero explicitely? +// Nodes: make(map[string]*RepoNode, 0), +// } +// } // WireParents helper method to reference from child to parent in a tree // recursively diff --git a/contentserver.go b/contentserver.go index e12249e..6aff610 100644 --- a/contentserver.go +++ b/contentserver.go @@ -11,6 +11,9 @@ import ( "github.com/foomo/contentserver/metrics" "github.com/foomo/contentserver/status" + "net/http" + _ "net/http/pprof" + "github.com/foomo/contentserver/log" "github.com/foomo/contentserver/server" ) @@ -66,6 +69,10 @@ func exitUsage(code int) { func main() { flag.Parse() + go func() { + fmt.Println(http.ListenAndServe("localhost:6060", nil)) + }() + if *flagShowVersionFlag { fmt.Printf("%v\n", uniqushPushVersion) return @@ -76,7 +83,7 @@ func main() { go func() { for { select { - case <-time.After(time.Duration(*flagFreeOSMem) * time.Second): + case <-time.After(time.Duration(*flagFreeOSMem) * time.Minute): log.Notice("FreeOSMemory") debug.FreeOSMemory() } diff --git a/contentserver.graffle b/contentserver.graffle index 75addb6..ccf971f 100644 Binary files a/contentserver.graffle and b/contentserver.graffle differ