Previously `ReadPerf` was in time.Duration is changed to `ReadThroughput` in uint64.
@ -335,7 +335,7 @@ type ServerMemUsageInfo struct {
// ServerNetReadPerfInfo network read performance information.
type ServerNetReadPerfInfo struct {
Addr string `json:"addr"`
ReadPerf time.Duration `json:"readPerf"`
ReadThroughput uint64 `json:"readThroughput"`
Error string `json:"error,omitempty"`
}
@ -106,9 +106,10 @@ func (s *peerRESTServer) NetReadPerfInfoHandler(w http.ResponseWriter, r *http.R
addr = GetLocalPeer(globalEndpoints)
d := end.Sub(start)
info := ServerNetReadPerfInfo{
Addr: addr,
ReadPerf: end.Sub(start),
ReadThroughput: uint64(int64(time.Second) * size / int64(d)),
ctx := newContext(r, w, "NetReadPerfInfo")
@ -281,10 +281,10 @@ Fetches Mem utilization for all cluster nodes.
Fetches network performance of all cluster nodes using given sized payload. Returned value is a map containing each node indexed list of performance of other nodes.
| Param | Type | Description |
|------------|------------------|--------------------------------------------------------------------|
|------------------|-----------|--------------------------------------------------------------------|
| `Addr` | _string_ | Address of the server the following information is retrieved from. |
| `Error` | _string_ | Errors (if any) encountered while reaching this node |
| `ReadPerf` | _time.Duration_ | Network read performance of the server |
| `ReadThroughput` | _uint64_ | Network read throughput of the server in bytes per second |
## 5. Heal operations
@ -306,7 +306,7 @@ func (adm *AdminClient) ServerMemUsageInfo() ([]ServerMemUsageInfo, error) {
// NetPerfInfo network performance information.
type NetPerfInfo struct {