From bbb46d1abeb76cf17a89384fc0d65f7d4c3d24f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E9=A3=9E?= Date: Fri, 12 Jul 2019 15:26:52 +0800 Subject: [PATCH] fix typo: return value of the cpu getter --- pkg/ratelimit/bbr/bbr_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/ratelimit/bbr/bbr_test.go b/pkg/ratelimit/bbr/bbr_test.go index 1a24fd7a7..7672614c8 100644 --- a/pkg/ratelimit/bbr/bbr_test.go +++ b/pkg/ratelimit/bbr/bbr_test.go @@ -171,7 +171,7 @@ func TestGroup(t *testing.T) { func BenchmarkBBRAllowUnderLowLoad(b *testing.B) { cpuGetter := func() int64 { - return 50 + return 500 } bucketDuration := time.Millisecond * 100 passStat := metric.NewRollingCounter(metric.RollingCounterOpts{Size: 10, BucketDuration: bucketDuration}) @@ -194,7 +194,7 @@ func BenchmarkBBRAllowUnderLowLoad(b *testing.B) { func BenchmarkBBRAllowUnderHighLoad(b *testing.B) { cpuGetter := func() int64 { - return 90 + return 900 } bucketDuration := time.Millisecond * 100 passStat := metric.NewRollingCounter(metric.RollingCounterOpts{Size: 10, BucketDuration: bucketDuration}) @@ -217,7 +217,7 @@ func BenchmarkBBRAllowUnderHighLoad(b *testing.B) { func BenchmarkBBRShouldDropUnderLowLoad(b *testing.B) { cpuGetter := func() int64 { - return 50 + return 500 } bucketDuration := time.Millisecond * 100 passStat := metric.NewRollingCounter(metric.RollingCounterOpts{Size: 10, BucketDuration: bucketDuration}) @@ -244,7 +244,7 @@ func BenchmarkBBRShouldDropUnderLowLoad(b *testing.B) { func BenchmarkBBRShouldDropUnderHighLoad(b *testing.B) { cpuGetter := func() int64 { - return 90 + return 900 } bucketDuration := time.Millisecond * 100 passStat := metric.NewRollingCounter(metric.RollingCounterOpts{Size: 10, BucketDuration: bucketDuration})