add timestamp to stats

This commit is contained in:
Asim Aslam
2019-12-04 23:51:07 +00:00
parent 26755f86b1
commit 78647c7027
5 changed files with 63 additions and 49 deletions

View File

@@ -38,6 +38,7 @@ func (d *Debug) Stats(ctx context.Context, req *proto.StatsRequest, rsp *proto.S
var mstat runtime.MemStats
runtime.ReadMemStats(&mstat)
rsp.Timestamp = uint64(time.Now().Unix())
rsp.Started = uint64(d.started)
rsp.Uptime = uint64(time.Now().Unix() - d.started)
rsp.Memory = mstat.Alloc