fix: bandwidth displayed in mc replicate status (#4664)

This commit is contained in:
Poorna
2023-08-18 14:57:55 -07:00
committed by GitHub
parent df68f5cf89
commit acc25b8c50
+4 -2
View File
@@ -229,10 +229,12 @@ func (s replicateStatusMessage) String() string {
limit := "N/A" // N/A means cluster bandwidth is not configured
current := "N/A" // N/A means there is
if bwStat.CurrentBandwidthInBytesPerSecond > 0 {
current = humanize.Bytes(uint64(bwStat.CurrentBandwidthInBytesPerSecond))
current = humanize.Bytes(uint64(bwStat.CurrentBandwidthInBytesPerSecond * 8))
current = fmt.Sprintf("%sb/s", current[:len(current)-1])
}
if bwStat.BandWidthLimitInBytesPerSecond > 0 {
limit = humanize.Bytes(uint64(bwStat.BandWidthLimitInBytesPerSecond))
limit = humanize.Bytes(uint64(bwStat.BandWidthLimitInBytesPerSecond * 8))
limit = fmt.Sprintf("%sb/s", limit[:len(limit)-1])
}
r = console.Colorize("THeaderBold", newPrettyTable("",
Field{"B/w limit Hdr", 80},