commented out unused RepoNode constructor, updated pprof

This commit is contained in:
Philipp Mieden 2019-05-22 09:52:58 +02:00
parent a4097c05f4
commit 28292faea9
3 changed files with 15 additions and 8 deletions

View File

@ -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

View File

@ -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()
}

Binary file not shown.