github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/helper/stats/runtime.go (about) 1 package stats 2 3 import ( 4 "runtime" 5 "strconv" 6 ) 7 8 // RuntimeStats is used to return various runtime information 9 func RuntimeStats() map[string]string { 10 return map[string]string{ 11 "kernel.name": runtime.GOOS, 12 "arch": runtime.GOARCH, 13 "version": runtime.Version(), 14 "max_procs": strconv.FormatInt(int64(runtime.GOMAXPROCS(0)), 10), 15 "goroutines": strconv.FormatInt(int64(runtime.NumGoroutine()), 10), 16 "cpu_count": strconv.FormatInt(int64(runtime.NumCPU()), 10), 17 } 18 }