From bee3326f4b83855a1ef9b506ee25989c6ca92352 Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Tue, 1 Dec 2015 09:38:36 +0100 Subject: [PATCH] modif test --- cache_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cache_test.go b/cache_test.go index 01c6fb4..ab6a547 100644 --- a/cache_test.go +++ b/cache_test.go @@ -1618,15 +1618,15 @@ func BenchmarkDeleteExpired(b *testing.B) { func BenchmarkLargeCache(b *testing.B) { b.StopTimer() - tc := New(200 * time.Millisecond, 50 * time.Millisecond) + tc := New(100 * time.Millisecond, 1 * time.Millisecond) //tc.mu.Lock() - for i := 0; i < 100000; i++ { - tc.set(strconv.Itoa(i), "bar", DefaultExpiration) + for i := 0; i < 1000000; i++ { + tc.Set(strconv.Itoa(i), "bar", DefaultExpiration) } //tc.mu.Unlock() tc.DeleteExpired() b.StartTimer() - for i := 100000; i <100000 + b.N; i++ { - tc.set(strconv.Itoa(i), "bar", DefaultExpiration) + for i := 1000000; i <1000000 + b.N; i++ { + tc.Set(strconv.Itoa(i), "bar", DefaultExpiration) } }