mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
commented out unused RepoNode constructor, updated pprof
This commit is contained in:
parent
a4097c05f4
commit
28292faea9
@ -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
|
||||
|
||||
@ -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.
Loading…
Reference in New Issue
Block a user