@@ -43,6 +43,7 @@ type traceStatsUI struct {
4343 meter spinner.Model
4444 quitting bool
4545 maxEntries int
46+ allFlag bool
4647}
4748
4849func (m * traceStatsUI ) Init () tea.Cmd {
@@ -127,13 +128,15 @@ func (m *traceStatsUI) View() string {
127128 }
128129 }
129130
130- if totalRX > 0 {
131- s .WriteString (console .Colorize ("metrics-top-title" , fmt .Sprintf ("RX Rate:↑ %s/m\n " ,
132- humanize .IBytes (uint64 (float64 (totalRX )/ dur .Minutes ())))))
133- }
134- if totalTX > 0 {
135- s .WriteString (console .Colorize ("metrics-top-title" , fmt .Sprintf ("TX Rate:↓ %s/m\n " ,
136- humanize .IBytes (uint64 (float64 (totalTX )/ dur .Minutes ())))))
131+ if ! m .allFlag {
132+ if totalRX > 0 {
133+ s .WriteString (console .Colorize ("metrics-top-title" , fmt .Sprintf ("RX Rate:↑ %s/m\n " ,
134+ humanize .IBytes (uint64 (float64 (totalRX )/ dur .Minutes ())))))
135+ }
136+ if totalTX > 0 {
137+ s .WriteString (console .Colorize ("metrics-top-title" , fmt .Sprintf ("TX Rate:↓ %s/m\n " ,
138+ humanize .IBytes (uint64 (float64 (totalTX )/ dur .Minutes ())))))
139+ }
137140 }
138141 s .WriteString (console .Colorize ("metrics-top-title" , fmt .Sprintf ("RPM : %0.1f\n " , float64 (totalCnt )/ dur .Minutes ())))
139142 s .WriteString ("-------------\n " )
@@ -273,7 +276,7 @@ func roundDur(d time.Duration) time.Duration {
273276 return d .Round (time .Microsecond )
274277}
275278
276- func initTraceStatsUI (maxEntries int , traces <- chan madmin.ServiceTraceInfo ) * traceStatsUI {
279+ func initTraceStatsUI (allFlag bool , maxEntries int , traces <- chan madmin.ServiceTraceInfo ) * traceStatsUI {
277280 meter := spinner .New ()
278281 meter .Spinner = spinner .Meter
279282 meter .Style = lipgloss .NewStyle ().Foreground (lipgloss .Color ("205" ))
@@ -301,5 +304,6 @@ func initTraceStatsUI(maxEntries int, traces <-chan madmin.ServiceTraceInfo) *tr
301304 meter : meter ,
302305 maxEntries : maxEntries ,
303306 current : stats ,
307+ allFlag : allFlag ,
304308 }
305309}
0 commit comments