Skip to content

Commit

Permalink
switch RX and TX arrow marks correctly
Browse files Browse the repository at this point in the history
the arrow marks must be from server perpective
not `mc` perspective.
  • Loading branch information
harshavardhana committed Jun 11, 2024
1 parent 7a0a8f5 commit a472e3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/admin-trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -1152,12 +1152,12 @@ func (m *traceStatsUI) View() string {
if v.CallStatsCount > 0 {
var s, r []string
if v.CallStats.Rx > 0 {
s = append(s, fmt.Sprintf(" %s", humanize.IBytes(uint64(v.CallStats.Rx/v.CallStatsCount))))
r = append(r, fmt.Sprintf(" %s", humanize.IBytes(uint64(float64(v.CallStats.Rx)/dur.Minutes()))))
s = append(s, fmt.Sprintf(" %s", humanize.IBytes(uint64(v.CallStats.Rx/v.CallStatsCount))))

This comment has been minimized.

Copy link
@klauspost

klauspost Jun 11, 2024

Contributor

@harshavardhana From the handler (server) perspective: Rx = Received, meaning downloaded, meaning arrow down.

You are switching this to the sender perspective. Here is the current:

s3.PutObjectPart              3 (0.2%)     .....       ↓ 12 MiB          ↓ 14 MiB/m

From the server perspective PutObjectPart is downloading. The client is uploading.

So either you want it from the client perspective (and we keep this swap), or from the server perspective and we revert.

This comment has been minimized.

Copy link
@klauspost

klauspost Jun 11, 2024

Contributor

Probably we should also switch rate to /s - I kept it to match RPM.. But it seems silly since nobody uses that metric.

r = append(r, fmt.Sprintf(" %s", humanize.IBytes(uint64(float64(v.CallStats.Rx)/dur.Minutes()))))
}
if v.CallStats.Tx > 0 {
s = append(s, fmt.Sprintf(" %s", humanize.IBytes(uint64(v.CallStats.Tx/v.CallStatsCount))))
r = append(r, fmt.Sprintf(" %s", humanize.IBytes(uint64(float64(v.CallStats.Tx)/dur.Minutes()))))
s = append(s, fmt.Sprintf(" %s", humanize.IBytes(uint64(v.CallStats.Tx/v.CallStatsCount))))
r = append(r, fmt.Sprintf(" %s", humanize.IBytes(uint64(float64(v.CallStats.Tx)/dur.Minutes()))))
}
if len(s) > 0 {
sz = strings.Join(s, " ")
Expand Down

0 comments on commit a472e3d

Please sign in to comment.