modified test
This commit is contained in:
parent
e58a7a95f4
commit
810668b922
|
@ -1648,9 +1648,33 @@ func BenchmarkDeleteExpiredLoop(b *testing.B) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkLargeCache(b *testing.B) {
|
func BenchmarkLargeCache01(b *testing.B) {
|
||||||
|
benchmarkLargeCache(b, 100000)
|
||||||
|
}
|
||||||
|
|
||||||
|
func BenchmarkLargeCache02(b *testing.B) {
|
||||||
|
benchmarkLargeCache(b, 200000)
|
||||||
|
}
|
||||||
|
|
||||||
|
func BenchmarkLargeCache05(b *testing.B) {
|
||||||
|
benchmarkLargeCache(b, 500000)
|
||||||
|
}
|
||||||
|
|
||||||
|
func BenchmarkLargeCache10(b *testing.B) {
|
||||||
|
benchmarkLargeCache(b, 1000000)
|
||||||
|
}
|
||||||
|
|
||||||
|
func BenchmarkLargeCache20(b *testing.B) {
|
||||||
|
benchmarkLargeCache(b, 2000000)
|
||||||
|
}
|
||||||
|
|
||||||
|
func BenchmarkLargeCache50(b *testing.B) {
|
||||||
|
benchmarkLargeCache(b, 5000000)
|
||||||
|
}
|
||||||
|
|
||||||
|
func benchmarkLargeCache(b *testing.B, nano int) {
|
||||||
b.StopTimer()
|
b.StopTimer()
|
||||||
tc := New(100*time.Millisecond, 1*time.Millisecond)
|
tc := New(100*time.Millisecond, time.Duration(nano)*time.Nanosecond)
|
||||||
b.StartTimer()
|
b.StartTimer()
|
||||||
b.N = 1000000
|
b.N = 1000000
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
|
|
Loading…
Reference in New Issue