added cpu and threads to stats

This commit is contained in:
Josh Baker 2018-03-09 17:24:23 -07:00
parent 4c2c1dd186
commit 9428b84484
1 changed files with 2 additions and 0 deletions

View File

@ -118,6 +118,8 @@ func (c *Controller) cmdServer(msg *server.Message) (res resp.Value, err error)
m["avg_item_size"] = avgsz m["avg_item_size"] = avgsz
m["pointer_size"] = (32 << uintptr(uint64(^uintptr(0))>>63)) / 8 m["pointer_size"] = (32 << uintptr(uint64(^uintptr(0))>>63)) / 8
m["read_only"] = c.config.readOnly() m["read_only"] = c.config.readOnly()
m["cpus"] = runtime.NumCPU()
m["threads"] = runtime.GOMAXPROCS(0)
switch msg.OutputType { switch msg.OutputType {
case server.JSON: case server.JSON: