|
|
@ -7,6 +7,7 @@ import (
|
|
|
|
"net"
|
|
|
|
"net"
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
|
|
|
|
"runtime"
|
|
|
|
"strconv"
|
|
|
|
"strconv"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -139,3 +140,15 @@ func uint64ToBytes(u uint64) []byte {
|
|
|
|
binary.BigEndian.PutUint64(buf, u)
|
|
|
|
binary.BigEndian.PutUint64(buf, u)
|
|
|
|
return buf
|
|
|
|
return buf
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// runtimeStats is used to return various runtime information
|
|
|
|
|
|
|
|
func runtimeStats() map[string]string {
|
|
|
|
|
|
|
|
return map[string]string{
|
|
|
|
|
|
|
|
"os": runtime.GOOS,
|
|
|
|
|
|
|
|
"arch": runtime.GOARCH,
|
|
|
|
|
|
|
|
"version": runtime.Version(),
|
|
|
|
|
|
|
|
"max_procs": strconv.FormatInt(int64(runtime.GOMAXPROCS(0)), 10),
|
|
|
|
|
|
|
|
"goroutines": strconv.FormatInt(int64(runtime.NumGoroutine()), 10),
|
|
|
|
|
|
|
|
"cpu_count": strconv.FormatInt(int64(runtime.NumCPU()), 10),
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|