Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate collectors #266

Merged
merged 1 commit into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/bench/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (g *Get) Prepare(ctx context.Context) error {
return (fmt.Errorf("no objects found for bucket %s", g.Bucket))
}
done()
g.Collector = NewCollector()
g.addCollector()
return nil
}

Expand Down Expand Up @@ -141,7 +141,6 @@ func (g *Get) Prepare(ctx context.Context) error {

var wg sync.WaitGroup
wg.Add(g.Concurrency)
g.addCollector()

obj := make(chan struct{}, g.CreateObjects)
for i := 0; i < g.CreateObjects; i++ {
Expand Down
3 changes: 1 addition & 2 deletions pkg/bench/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ import (
// List benchmarks listing speed.
type List struct {
Common
Collector *Collector
objects []generator.Objects
objects []generator.Objects

CreateObjects int
Versions int
Expand Down
3 changes: 1 addition & 2 deletions pkg/bench/mixed.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ import (
// Mixed benchmarks mixed operations all inclusive.
type Mixed struct {
Common
Collector *Collector
Dist *MixedDistribution
Dist *MixedDistribution

GetOpts minio.GetObjectOptions
StatOpts minio.StatObjectOptions
Expand Down
1 change: 0 additions & 1 deletion pkg/bench/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
// Select benchmarks download speed.
type Select struct {
Common
Collector *Collector

// Default Select options.
SelectOpts minio.SelectObjectOptions
Expand Down