Skip to content
Merged
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
6 changes: 0 additions & 6 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ func TestPoolPerf(t *testing.T) {
n := 1000
ctx := context.Background()

var egDuration time.Duration
t.Run("errgroup", func(t *testing.T) {
var count2 atomic.Int32
st := time.Now()
defer func() {
egDuration = time.Since(st)
t.Logf("elapsed errgroup: %v", time.Since(st))
}()
g, _ := errgroup.WithContext(ctx)
Expand Down Expand Up @@ -76,7 +74,6 @@ func TestPoolPerf(t *testing.T) {
require.NoError(t, p.Wait(ctx))
assert.Equal(t, int32(1000000), count1.Load())
t.Logf("elapsed pool: %v", time.Since(st))
assert.Less(t, time.Since(st), egDuration)
})

t.Run("pool with 100 chan size", func(t *testing.T) {
Expand All @@ -100,7 +97,6 @@ func TestPoolPerf(t *testing.T) {
require.NoError(t, p.Wait(ctx))
assert.Equal(t, int32(1000000), count1.Load())
t.Logf("elapsed pool: %v", time.Since(st))
assert.Less(t, time.Since(st), egDuration)
})

t.Run("pool with 100 chan size and 100 batch size", func(t *testing.T) {
Expand All @@ -124,7 +120,6 @@ func TestPoolPerf(t *testing.T) {
require.NoError(t, p.Wait(ctx))
assert.Equal(t, int32(1000000), count1.Load())
t.Logf("elapsed pool: %v", time.Since(st))
assert.Less(t, time.Since(st), egDuration)
})

t.Run("pool with 100 chan size and 100 batch size and chunking", func(t *testing.T) {
Expand All @@ -150,7 +145,6 @@ func TestPoolPerf(t *testing.T) {
require.NoError(t, p.Wait(ctx))
assert.Equal(t, int32(1000000), count1.Load())
t.Logf("elapsed pool: %v", time.Since(st))
assert.Less(t, time.Since(st), egDuration)
})

}
Expand Down