From b05731d1516c832c118d619db7a008cdb28e6413 Mon Sep 17 00:00:00 2001 From: phuslu Date: Mon, 2 Dec 2024 23:30:42 +0800 Subject: [PATCH] use 10% write ratio for zipfan benchmark --- .github/workflows/benchmark.yml | 2 +- README.md | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 55a2532..21bd1ac 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -32,4 +32,4 @@ jobs: working-directory: ./bench run: | env writeratio=0.1 zipfian=false go test -v -cpu=8 -run=none -bench=. -benchtime=5s -benchmem bench_test.go - env writeratio=0.01 zipfian=true go test -v -cpu=8 -run=none -bench=. -benchtime=5s -benchmem bench_test.go + env writeratio=0.1 zipfian=true go test -v -cpu=8 -run=none -bench=. -benchtime=5s -benchmem bench_test.go diff --git a/README.md b/README.md index d964d3c..1eede8a 100644 --- a/README.md +++ b/README.md @@ -466,35 +466,35 @@ PASS ok command-line-arguments 111.510s ``` -with zipfian read (99%) and randomly write(1%) +with zipfian read (90%) and randomly write(10%) ``` goos: linux goarch: amd64 cpu: AMD EPYC 7763 64-Core Processor BenchmarkHashicorpSetGet -BenchmarkHashicorpSetGet-8 15919035 376.2 ns/op 0 B/op 0 allocs/op +BenchmarkHashicorpSetGet-8 12294760 493.0 ns/op 2 B/op 0 allocs/op BenchmarkCloudflareSetGet -BenchmarkCloudflareSetGet-8 53066322 121.4 ns/op 16 B/op 1 allocs/op +BenchmarkCloudflareSetGet-8 46405207 153.5 ns/op 16 B/op 1 allocs/op BenchmarkEcacheSetGet -BenchmarkEcacheSetGet-8 62513349 97.02 ns/op 0 B/op 0 allocs/op +BenchmarkEcacheSetGet-8 52767176 121.1 ns/op 2 B/op 0 allocs/op BenchmarkLxzanSetGet -BenchmarkLxzanSetGet-8 63570199 95.26 ns/op 0 B/op 0 allocs/op +BenchmarkLxzanSetGet-8 51649995 121.1 ns/op 0 B/op 0 allocs/op BenchmarkFreelruSetGet -BenchmarkFreelruSetGet-8 59656036 103.1 ns/op 0 B/op 0 allocs/op +BenchmarkFreelruSetGet-8 51329652 124.5 ns/op 0 B/op 0 allocs/op BenchmarkPhusluSetGet -BenchmarkPhusluSetGet-8 86247986 72.97 ns/op 0 B/op 0 allocs/op +BenchmarkPhusluSetGet-8 71686588 93.67 ns/op 0 B/op 0 allocs/op BenchmarkNoTTLSetGet -BenchmarkNoTTLSetGet-8 86648599 69.10 ns/op 0 B/op 0 allocs/op +BenchmarkNoTTLSetGet-8 75004855 92.83 ns/op 0 B/op 0 allocs/op BenchmarkCcacheSetGet -BenchmarkCcacheSetGet-8 23900656 263.9 ns/op 21 B/op 2 allocs/op +BenchmarkCcacheSetGet-8 14975454 410.7 ns/op 31 B/op 2 allocs/op BenchmarkRistrettoSetGet -BenchmarkRistrettoSetGet-8 63938320 93.84 ns/op 4 B/op 0 allocs/op +BenchmarkRistrettoSetGet-8 41376799 123.4 ns/op 12 B/op 0 allocs/op BenchmarkTheineSetGet -BenchmarkTheineSetGet-8 61027147 102.2 ns/op 0 B/op 0 allocs/op +BenchmarkTheineSetGet-8 33214615 189.0 ns/op 3 B/op 0 allocs/op BenchmarkOtterSetGet -BenchmarkOtterSetGet-8 80983778 72.15 ns/op 1 B/op 0 allocs/op +BenchmarkOtterSetGet-8 57564613 114.5 ns/op 8 B/op 0 allocs/op PASS -ok command-line-arguments 100.932s +ok command-line-arguments 103.296s ``` ### GC scan