Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package minio-client for openSUSE:Factory checked in at 2024-07-28 17:19:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/minio-client (Old) and /work/SRC/openSUSE:Factory/.minio-client.new.1882 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "minio-client" Sun Jul 28 17:19:55 2024 rev:91 rq:1189898 version:20240726T130844Z Changes: -------- --- /work/SRC/openSUSE:Factory/minio-client/minio-client.changes 2024-07-25 15:49:15.971409122 +0200 +++ /work/SRC/openSUSE:Factory/.minio-client.new.1882/minio-client.changes 2024-07-28 17:20:30.234336023 +0200 @@ -1,0 +2,7 @@ +Sat Jul 27 11:35:58 UTC 2024 - opensuse_buildservice@ojkastl.de + +- Update to version 20240726T130844Z: + * trace: avoid aggregate statistics TX/RX with --all (#4998) + * Make trace stats more compact (#4999) + +------------------------------------------------------------------- Old: ---- mc-20240722T200249Z.obscpio New: ---- mc-20240726T130844Z.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ minio-client.spec ++++++ --- /var/tmp/diff_new_pack.DazcxB/_old 2024-07-28 17:20:31.430383816 +0200 +++ /var/tmp/diff_new_pack.DazcxB/_new 2024-07-28 17:20:31.434383976 +0200 @@ -22,7 +22,7 @@ %define binary_name minio-client Name: minio-client -Version: 20240722T200249Z +Version: 20240726T130844Z Release: 0 Summary: Client for MinIO License: AGPL-3.0-only ++++++ _service ++++++ --- /var/tmp/diff_new_pack.DazcxB/_old 2024-07-28 17:20:31.462385095 +0200 +++ /var/tmp/diff_new_pack.DazcxB/_new 2024-07-28 17:20:31.466385255 +0200 @@ -5,7 +5,7 @@ <param name="exclude">.git</param> <param name="changesgenerate">enable</param> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">RELEASE.2024-07-22T20-02-49Z</param> + <param name="revision">RELEASE.2024-07-26T13-08-44Z</param> <param name="match-tag">RELEASE.*</param> <param name="versionrewrite-pattern">RELEASE\.(.*)-(.*)-(.*)-(.*)-(.*)</param> <param name="versionrewrite-replacement">\1\2\3\4\5</param> @@ -19,7 +19,7 @@ <param name="compression">gz</param> </service> <service name="go_modules" mode="manual"> - <param name="archive">mc-20240722T200249Z.obscpio</param> + <param name="archive">mc-20240726T130844Z.obscpio</param> </service> </services> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.DazcxB/_old 2024-07-28 17:20:31.486386054 +0200 +++ /var/tmp/diff_new_pack.DazcxB/_new 2024-07-28 17:20:31.486386054 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/minio/mc</param> - <param name="changesrevision">58c42bc91bbab04e4073bd8d018b0420ccb21591</param></service></servicedata> + <param name="changesrevision">8ad22bb69435c831b6a16d4cb03c248145929d95</param></service></servicedata> (No newline at EOF) ++++++ mc-20240722T200249Z.obscpio -> mc-20240726T130844Z.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20240722T200249Z/cmd/admin-trace.go new/mc-20240726T130844Z/cmd/admin-trace.go --- old/mc-20240722T200249Z/cmd/admin-trace.go 2024-07-22 22:02:49.000000000 +0200 +++ new/mc-20240726T130844Z/cmd/admin-trace.go 2024-07-26 15:08:44.000000000 +0200 @@ -529,7 +529,7 @@ traceCh := client.ServiceTrace(ctxt, opts) if stats { filteredTraces := make(chan madmin.ServiceTraceInfo, 1) - ui := tea.NewProgram(initTraceStatsUI(ctx.Int("stats-n"), filteredTraces)) + ui := tea.NewProgram(initTraceStatsUI(ctx.Bool("all"), ctx.Int("stats-n"), filteredTraces)) var te error go func() { for t := range traceCh { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20240722T200249Z/cmd/support-top-api.go new/mc-20240726T130844Z/cmd/support-top-api.go --- old/mc-20240722T200249Z/cmd/support-top-api.go 2024-07-22 22:02:49.000000000 +0200 +++ new/mc-20240726T130844Z/cmd/support-top-api.go 2024-07-26 15:08:44.000000000 +0200 @@ -104,7 +104,7 @@ traceCh := client.ServiceTrace(ctxt, opts) filteredTraces := make(chan madmin.ServiceTraceInfo, 1) - ui := tea.NewProgram(initTraceStatsUI(30, filteredTraces)) + ui := tea.NewProgram(initTraceStatsUI(false, 30, filteredTraces)) var te error go func() { for t := range traceCh { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mc-20240722T200249Z/cmd/trace-stats-ui.go new/mc-20240726T130844Z/cmd/trace-stats-ui.go --- old/mc-20240722T200249Z/cmd/trace-stats-ui.go 2024-07-22 22:02:49.000000000 +0200 +++ new/mc-20240726T130844Z/cmd/trace-stats-ui.go 2024-07-26 15:08:44.000000000 +0200 @@ -28,7 +28,7 @@ "github.com/charmbracelet/bubbles/spinner" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" - humanize "github.com/dustin/go-humanize" + "github.com/dustin/go-humanize" "github.com/fatih/color" "github.com/minio/madmin-go/v3" "github.com/minio/pkg/v3/console" @@ -43,6 +43,7 @@ meter spinner.Model quitting bool maxEntries int + allFlag bool } func (m *traceStatsUI) Init() tea.Cmd { @@ -127,13 +128,15 @@ } } - if totalRX > 0 { - s.WriteString(console.Colorize("metrics-top-title", fmt.Sprintf("RX Rate:↑ %s/m\n", - humanize.IBytes(uint64(float64(totalRX)/dur.Minutes()))))) - } - if totalTX > 0 { - s.WriteString(console.Colorize("metrics-top-title", fmt.Sprintf("TX Rate:↓ %s/m\n", - humanize.IBytes(uint64(float64(totalTX)/dur.Minutes()))))) + if !m.allFlag { + if totalRX > 0 { + s.WriteString(console.Colorize("metrics-top-title", fmt.Sprintf("RX Rate:↑ %s/m\n", + humanize.IBytes(uint64(float64(totalRX)/dur.Minutes()))))) + } + if totalTX > 0 { + s.WriteString(console.Colorize("metrics-top-title", fmt.Sprintf("TX Rate:↓ %s/m\n", + humanize.IBytes(uint64(float64(totalTX)/dur.Minutes()))))) + } } s.WriteString(console.Colorize("metrics-top-title", fmt.Sprintf("RPM : %0.1f\n", float64(totalCnt)/dur.Minutes()))) s.WriteString("-------------\n") @@ -154,7 +157,7 @@ } t = append(t, console.Colorize("metrics-top-title", "Avg Size"), - console.Colorize("metrics-top-title", "Rate"), + console.Colorize("metrics-top-title", "Rate /min"), console.Colorize("metrics-top-title", "Errors"), ) @@ -193,24 +196,24 @@ sz := "-" rate := "-" if v.Size > 0 && v.Count > 0 { - sz = humanize.IBytes(uint64(v.Size) / uint64(v.Count)) - rate = fmt.Sprintf("%s/m", humanize.IBytes(uint64(float64(v.Size)/dur.Minutes()))) + sz = ibytesShort(uint64(v.Size) / uint64(v.Count)) + rate = ibytesShort(uint64(float64(v.Size) / dur.Minutes())) } 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", ibytesShort(uint64(v.CallStats.Rx/v.CallStatsCount)))) + r = append(r, fmt.Sprintf("↑%s", ibytesShort(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", ibytesShort(uint64(v.CallStats.Tx/v.CallStatsCount)))) + r = append(r, fmt.Sprintf("↓%s", ibytesShort(uint64(float64(v.CallStats.Tx)/dur.Minutes())))) } - if len(s) > 0 { + if len(s)+len(r) > 0 { sz = strings.Join(s, " ") } if len(r) > 0 { - rate = strings.Join(r, " ") + "/m" + rate = strings.Join(r, " ") } } if sz != "-" { @@ -223,14 +226,18 @@ console.Colorize("metrics-number", fmt.Sprintf("%d ", v.Count)) + console.Colorize("metrics-number-secondary", fmt.Sprintf("(%0.1f%%)", float64(v.Count)/float64(totalCnt)*100)), console.Colorize("metrics-number", fmt.Sprintf("%0.1f", float64(v.Count)/dur.Minutes())), - console.Colorize(avgColor, fmt.Sprintf("%v", avg.Round(time.Microsecond))), - console.Colorize(minColor, v.MinDur), - console.Colorize(maxColor, v.MaxDur), + console.Colorize(avgColor, fmt.Sprintf("%v", roundDur(avg))), + console.Colorize(minColor, roundDur(v.MinDur)), + console.Colorize(maxColor, roundDur(v.MaxDur)), } if hasTTFB { - t = append(t, - console.Colorize(avgColor, fmt.Sprintf("%v", avgTTFB.Round(time.Microsecond))), - console.Colorize(maxColor, v.MaxTTFB)) + if v.TTFB > 0 { + t = append(t, + console.Colorize(avgColor, fmt.Sprintf("%v", roundDur(avgTTFB))), + console.Colorize(maxColor, roundDur(v.MaxTTFB))) + } else { + t = append(t, "-", "-") + } } t = append(t, sz, rate, errs) table.Append(t) @@ -250,10 +257,31 @@ return strings.Join(split, "\n") } -func initTraceStatsUI(maxEntries int, traces <-chan madmin.ServiceTraceInfo) *traceStatsUI { +// ibytesShort returns a short un-padded version of the value from humanize.IBytes. +func ibytesShort(v uint64) string { + return strings.ReplaceAll(strings.TrimSuffix(humanize.IBytes(v), "iB"), " ", "") +} + +// roundDur will round the duration to a nice, printable number, with "reasonable" precision. +func roundDur(d time.Duration) time.Duration { + if d > time.Minute { + return d.Round(time.Second) + } + if d > time.Second { + return d.Round(time.Millisecond) + } + if d > time.Millisecond { + return d.Round(time.Millisecond / 10) + } + return d.Round(time.Microsecond) +} + +func initTraceStatsUI(allFlag bool, maxEntries int, traces <-chan madmin.ServiceTraceInfo) *traceStatsUI { meter := spinner.New() meter.Spinner = spinner.Meter meter.Style = lipgloss.NewStyle().Foreground(lipgloss.Color("205")) + // Use half the default fps to reduce flickering + meter.Spinner.FPS = time.Second / 3 console.SetColor("metrics-duration", color.New(color.FgWhite)) console.SetColor("metrics-size", color.New(color.FgGreen)) console.SetColor("metrics-dur", color.New(color.FgGreen)) @@ -276,5 +304,6 @@ meter: meter, maxEntries: maxEntries, current: stats, + allFlag: allFlag, } } ++++++ mc.obsinfo ++++++ --- /var/tmp/diff_new_pack.DazcxB/_old 2024-07-28 17:20:31.774397563 +0200 +++ /var/tmp/diff_new_pack.DazcxB/_new 2024-07-28 17:20:31.778397723 +0200 @@ -1,5 +1,5 @@ name: mc -version: 20240722T200249Z -mtime: 1721678569 -commit: 58c42bc91bbab04e4073bd8d018b0420ccb21591 +version: 20240726T130844Z +mtime: 1721999324 +commit: 8ad22bb69435c831b6a16d4cb03c248145929d95 ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/minio-client/vendor.tar.gz /work/SRC/openSUSE:Factory/.minio-client.new.1882/vendor.tar.gz differ: char 5, line 1