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
|
// published from - to is going to be an array of fromTos
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewRepoNode constructor
|
// // NewRepoNode constructor
|
||||||
func NewRepoNode() *RepoNode {
|
// func NewRepoNode() *RepoNode {
|
||||||
return &RepoNode{
|
// return &RepoNode{
|
||||||
Data: make(map[string]interface{}),
|
// Data: make(map[string]interface{}, 0), // set initial size to zero explicitely?
|
||||||
Nodes: make(map[string]*RepoNode),
|
// Nodes: make(map[string]*RepoNode, 0),
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// WireParents helper method to reference from child to parent in a tree
|
// WireParents helper method to reference from child to parent in a tree
|
||||||
// recursively
|
// recursively
|
||||||
|
|||||||
@ -11,6 +11,9 @@ import (
|
|||||||
"github.com/foomo/contentserver/metrics"
|
"github.com/foomo/contentserver/metrics"
|
||||||
"github.com/foomo/contentserver/status"
|
"github.com/foomo/contentserver/status"
|
||||||
|
|
||||||
|
"net/http"
|
||||||
|
_ "net/http/pprof"
|
||||||
|
|
||||||
"github.com/foomo/contentserver/log"
|
"github.com/foomo/contentserver/log"
|
||||||
"github.com/foomo/contentserver/server"
|
"github.com/foomo/contentserver/server"
|
||||||
)
|
)
|
||||||
@ -66,6 +69,10 @@ func exitUsage(code int) {
|
|||||||
func main() {
|
func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
fmt.Println(http.ListenAndServe("localhost:6060", nil))
|
||||||
|
}()
|
||||||
|
|
||||||
if *flagShowVersionFlag {
|
if *flagShowVersionFlag {
|
||||||
fmt.Printf("%v\n", uniqushPushVersion)
|
fmt.Printf("%v\n", uniqushPushVersion)
|
||||||
return
|
return
|
||||||
@ -76,7 +83,7 @@ func main() {
|
|||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-time.After(time.Duration(*flagFreeOSMem) * time.Second):
|
case <-time.After(time.Duration(*flagFreeOSMem) * time.Minute):
|
||||||
log.Notice("FreeOSMemory")
|
log.Notice("FreeOSMemory")
|
||||||
debug.FreeOSMemory()
|
debug.FreeOSMemory()
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user