perf net: Add the endpoint name related to the perf net error (#18063)

In a perf test, one node will run speed test with all nodes. If there is
an error with a peer node, the peer node name is not included in the
error hence confusing the user.

This commit will add the peer endpoint string to the netperf error.
This commit is contained in:
Anis Eleuch 2023-09-19 22:41:06 -07:00 committed by GitHub
parent 3cac927348
commit 69c0e18685
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -306,7 +306,7 @@ func netperf(ctx context.Context, duration time.Duration) madmin.NetperfNodeResu
defer wg.Done() defer wg.Done()
err := globalNotificationSys.peerClients[index].DevNull(ctx, r) err := globalNotificationSys.peerClients[index].DevNull(ctx, r)
if err != nil { if err != nil {
errStr = err.Error() errStr = fmt.Sprintf("error with %s: %s", globalNotificationSys.peerClients[index].String(), err.Error())
} }
}() }()
} }