update delete benchmarks

This commit is contained in:
Muhammed Efe Cetin
2023-09-15 18:23:02 +03:00
parent 36dd674d93
commit db1dd2bf6a
21 changed files with 109 additions and 93 deletions

View File

@@ -157,14 +157,13 @@ func Benchmark_Memcache_Get(b *testing.B) {
require.NoError(b, err)
}
func Benchmark_Memcache_Delete(b *testing.B) {
err := testStore.Set("john", []byte("doe"), 0)
require.NoError(b, err)
func Benchmark_Memcache_SetAndDelete(b *testing.B) {
b.ReportAllocs()
b.ResetTimer()
var err error
for i := 0; i < b.N; i++ {
_ = testStore.Set("john", []byte("doe"), 0)
err = testStore.Delete("john")
}