mirror of
https://github.com/minio/mc.git
synced 2025-07-30 07:23:03 +03:00
Upload results of perf tests to SUBNET (#4254)
This commit is contained in:
@ -46,7 +46,7 @@ func mainAdminSpeedtest(ctx *cli.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func mainAdminSpeedTestObject(ctx *cli.Context, aliasedURL string) error {
|
||||
func mainAdminSpeedTestObject(ctx *cli.Context, aliasedURL string, outCh chan<- PerfTestResult) error {
|
||||
client, perr := newAdminClient(aliasedURL)
|
||||
if perr != nil {
|
||||
fatalIf(perr.Trace(aliasedURL), "Unable to initialize admin client.")
|
||||
@ -135,11 +135,15 @@ func mainAdminSpeedTestObject(ctx *cli.Context, aliasedURL string) error {
|
||||
|
||||
go func() {
|
||||
if e != nil {
|
||||
p.Send(PerfTestResult{
|
||||
r := PerfTestResult{
|
||||
Type: ObjectPerfTest,
|
||||
Err: e.Error(),
|
||||
Final: true,
|
||||
})
|
||||
}
|
||||
p.Send(r)
|
||||
if outCh != nil {
|
||||
outCh <- r
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -150,11 +154,15 @@ func mainAdminSpeedTestObject(ctx *cli.Context, aliasedURL string) error {
|
||||
ObjectResult: &result,
|
||||
})
|
||||
}
|
||||
p.Send(PerfTestResult{
|
||||
r := PerfTestResult{
|
||||
Type: ObjectPerfTest,
|
||||
ObjectResult: &result,
|
||||
Final: true,
|
||||
})
|
||||
}
|
||||
p.Send(r)
|
||||
if outCh != nil {
|
||||
outCh <- r
|
||||
}
|
||||
}()
|
||||
|
||||
<-done
|
||||
|
Reference in New Issue
Block a user