X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=proxy%2Fclient.go;h=aea9a943313d8ab990221b2326f3c219982e3b4f;hb=b74e3b37479a7fa763bed1f2c76de612ee51dcbc;hp=6f29c7191e719c1ad6befe53f988337db282c7a2;hpb=2f75863ba9bff2d2f3488b70e441b5eefc91dfd2;p=govpp.git diff --git a/proxy/client.go b/proxy/client.go index 6f29c71..aea9a94 100644 --- a/proxy/client.go +++ b/proxy/client.go @@ -117,6 +117,16 @@ func (s *StatsClient) GetBufferStats(bufStats *api.BufferStats) error { return nil } +func (s *StatsClient) GetMemoryStats(memStats *api.MemoryStats) error { + req := StatsRequest{StatsType: "memory"} + resp := StatsResponse{MemStats: new(api.MemoryStats)} + if err := s.rpc.Call("StatsRPC.GetStats", req, &resp); err != nil { + return err + } + *memStats = *resp.MemStats + return nil +} + type BinapiClient struct { rpc *rpc.Client timeout time.Duration