mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix: speedtest Endpoint formatting
This commit is contained in:
parent
4567160e4d
commit
d004828b20
@ -1433,6 +1433,11 @@ func (sys *NotificationSys) GetClusterMetrics(ctx context.Context) chan Metric {
|
||||
func (sys *NotificationSys) Speedtest(ctx context.Context, size int, concurrent int, duration time.Duration) []madmin.SpeedtestResult {
|
||||
results := make([]madmin.SpeedtestResult, len(sys.peerClients)+1)
|
||||
|
||||
scheme := "http"
|
||||
if globalIsTLS {
|
||||
scheme = "https"
|
||||
}
|
||||
|
||||
var wg sync.WaitGroup
|
||||
for index := range sys.peerClients {
|
||||
if sys.peerClients[index] == nil {
|
||||
@ -1442,7 +1447,11 @@ func (sys *NotificationSys) Speedtest(ctx context.Context, size int, concurrent
|
||||
go func(index int) {
|
||||
defer wg.Done()
|
||||
r, err := sys.peerClients[index].Speedtest(ctx, size, concurrent, duration)
|
||||
results[index].Endpoint = sys.peerClients[index].String()
|
||||
u := &url.URL{
|
||||
Scheme: scheme,
|
||||
Host: sys.peerClients[index].host.String(),
|
||||
}
|
||||
results[index].Endpoint = u.String()
|
||||
results[index].Err = err
|
||||
if err == nil {
|
||||
results[index].Uploads = r.Uploads
|
||||
|
Loading…
Reference in New Issue
Block a user