cache
cache copied to clipboard
Add experimental arena backend
Lines Of Code
| Language | Files | Lines | Code | Comments | Blanks | Complexity | Bytes |
|---|---|---|---|---|---|---|---|
| Go | 43 (+4) | 5603 (+618) | 3916 (+437) | 452 (+39) | 1235 (+142) | 787 (+53) | 117.6K (+12.1K) |
| Go (test) | 28 (+2) | 3199 (+216) | 2354 (+171) | 196 (+7) | 649 (+38) | 140 (+4) | 76.4K (+5K) |
| YAML | 6 | 495 (+3) | 418 (+3) | 36 | 41 | 0 | 16K (+50B) |
Go API Changes
# github.com/bool64/cache/arena ## compatible changes package added # github.com/bool64/cache/arena/a ## compatible changes package added # github.com/bool64/cache/arena/sm ## compatible changes package added # summary Inferred base version: v0.4.4 Suggested version: v0.5.0
Benchmark Result
Benchmark diff with base branch
name old time/op new time/op delta
pkg:github.com/bool64/cache goos:linux goarch:amd64
_ShardedByteMap_concurrent-2 119ns ± 5% 117ns ± 6% ~ (p=0.452 n=5+5)
_Failover_noSyncRead-2 138ns ± 2% 137ns ± 1% ~ (p=0.063 n=5+5)
_FailoverSyncRead-2 408ns ± 1% 414ns ± 0% +1.51% (p=0.016 n=5+5)
_FailoverAlwaysBuild-2 1.68µs ± 0% 1.67µs ± 1% ~ (p=0.190 n=5+5)
ShardedMap_Dump-2 3.48µs ± 1% 3.46µs ± 1% ~ (p=0.421 n=5+5)
pkg:github.com/bool64/cache/bench goos:linux goarch:amd64
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMap)-2 190ns ± 2% 188ns ± 1% ~ (p=0.214 n=5+5)
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.SyncMap)-2 195ns ± 1% 194ns ± 1% ~ (p=0.841 n=5+5)
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 195ns ± 1% 193ns ± 0% -1.09% (p=0.016 n=5+5)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMap)-2 115ns ± 1% 113ns ± 1% -1.94% (p=0.008 n=5+5)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.SyncMap)-2 105ns ± 7% 100ns ± 0% -4.68% (p=0.016 n=5+5)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 115ns ± 1% 115ns ± 1% ~ (p=0.889 n=5+5)
Concurrent/c1000000:g2:w10.00%:ShardedMap/LRU-2 284ns ± 2% 264ns ± 2% -6.98% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMap-2 281ns ± 5% 273ns ± 3% ~ (p=0.310 n=5+5)
Concurrent/c1000000:g2:w10.00%:*cache.SyncMap-2 281ns ±16% 288ns ±17% ~ (p=0.421 n=5+5)
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 276ns ± 4% 261ns ± 2% -5.68% (p=0.016 n=5+5)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMap)-2 351ns ± 9% 335ns ± 3% ~ (p=0.095 n=5+5)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.SyncMap)-2 470ns ± 1% 451ns ±16% ~ (p=0.413 n=4+5)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 357ns ± 9% 354ns ± 1% ~ (p=0.667 n=5+4)
name old alloc/op new alloc/op delta
pkg:github.com/bool64/cache goos:linux goarch:amd64
_ShardedByteMap_concurrent-2 3.00B ± 0% 3.00B ± 0% ~ (all equal)
_Failover_noSyncRead-2 0.00B 0.00B ~ (all equal)
_FailoverSyncRead-2 160B ± 0% 160B ± 0% ~ (all equal)
_FailoverAlwaysBuild-2 447B ± 0% 447B ± 0% ~ (all equal)
ShardedMap_Dump-2 1.03kB ± 0% 1.02kB ± 2% ~ (p=0.667 n=4+5)
pkg:github.com/bool64/cache/bench goos:linux goarch:amd64
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMap)-2 3.00B ± 0% 3.00B ± 0% ~ (all equal)
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.SyncMap)-2 3.00B ± 0% 3.00B ± 0% ~ (all equal)
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 3.00B ± 0% 3.00B ± 0% ~ (all equal)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMap)-2 3.00B ± 0% 3.00B ± 0% ~ (all equal)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.SyncMap)-2 3.00B ± 0% 3.00B ± 0% ~ (all equal)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 3.00B ± 0% 3.00B ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:ShardedMap/LRU-2 24.0B ± 0% 24.0B ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMap-2 24.0B ± 0% 24.0B ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:*cache.SyncMap-2 36.0B ±22% 36.0B ±22% ~ (p=1.000 n=5+5)
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 22.0B ± 0% 22.0B ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMap)-2 43.0B ± 0% 43.0B ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.SyncMap)-2 68.0B ± 0% 68.0B ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 43.0B ± 0% 43.0B ± 0% ~ (all equal)
name old allocs/op new allocs/op delta
pkg:github.com/bool64/cache goos:linux goarch:amd64
_ShardedByteMap_concurrent-2 0.00 0.00 ~ (all equal)
_Failover_noSyncRead-2 0.00 0.00 ~ (all equal)
_FailoverSyncRead-2 3.00 ± 0% 3.00 ± 0% ~ (all equal)
_FailoverAlwaysBuild-2 11.0 ± 0% 11.0 ± 0% ~ (all equal)
ShardedMap_Dump-2 13.0 ± 0% 13.0 ± 0% ~ (all equal)
pkg:github.com/bool64/cache/bench goos:linux goarch:amd64
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMap)-2 0.00 0.00 ~ (all equal)
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.SyncMap)-2 0.00 0.00 ~ (all equal)
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 0.00 0.00 ~ (all equal)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMap)-2 0.00 0.00 ~ (all equal)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.SyncMap)-2 0.00 0.00 ~ (all equal)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 0.00 0.00 ~ (all equal)
Concurrent/c1000000:g2:w10.00%:ShardedMap/LRU-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMap-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:*cache.SyncMap-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMap)-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.SyncMap)-2 2.00 ± 0% 2.00 ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
name old MB/inuse new MB/inuse delta
pkg:github.com/bool64/cache/bench goos:linux goarch:amd64
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMap)-2 2.22 ± 0% 2.19 ± 0% -1.08% (p=0.008 n=5+5)
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.SyncMap)-2 2.73 ± 0% 2.73 ± 0% -0.26% (p=0.008 n=5+5)
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 2.03 ± 0% 2.03 ± 0% ~ (all equal)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMap)-2 2.18 ± 0% 2.19 ± 0% +0.37% (p=0.008 n=5+5)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.SyncMap)-2 2.73 ± 0% 2.71 ± 0% -0.59% (p=0.008 n=5+5)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 2.02 ± 0% 2.01 ± 0% -0.74% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:ShardedMap/LRU-2 196 ± 0% 195 ± 0% -0.20% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMap-2 196 ± 0% 196 ± 0% +0.20% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:*cache.SyncMap-2 268 ± 0% 268 ± 0% ~ (all equal)
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 180 ± 0% 181 ± 0% +0.22% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMap)-2 208 ± 0% 207 ± 0% -0.39% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.SyncMap)-2 280 ± 0% 280 ± 0% +0.11% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 192 ± 0% 188 ± 0% -2.24% (p=0.008 n=5+5)
name old ms/preload new ms/preload delta
pkg:github.com/bool64/cache/bench goos:linux goarch:amd64
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMap)-2 14.5 ± 0% 15.2 ± 0% +4.96% (p=0.008 n=5+5)
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.SyncMap)-2 16.9 ± 0% 18.0 ± 0% +6.08% (p=0.008 n=5+5)
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 11.9 ± 0% 11.9 ± 0% +0.51% (p=0.008 n=5+5)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMap)-2 12.3 ± 0% 12.3 ± 0% +0.57% (p=0.008 n=5+5)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.SyncMap)-2 16.7 ± 0% 17.1 ± 0% +2.39% (p=0.008 n=5+5)
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 11.9 ± 0% 12.0 ± 0% +0.50% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:ShardedMap/LRU-2 919 ± 0% 922 ± 0% +0.32% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMap-2 896 ± 0% 883 ± 0% -1.48% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:*cache.SyncMap-2 1.76k ± 0% 1.74k ± 0% -1.14% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 774 ± 0% 786 ± 0% +1.67% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMap)-2 1.60k ± 0% 1.58k ± 0% -1.56% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.SyncMap)-2 2.60k ± 0% 2.59k ± 0% -0.42% (p=0.008 n=5+5)
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 1.48k ± 0% 1.52k ± 0% +3.19% (p=0.008 n=5+5)
Benchmark result
name time/op
pkg:github.com/bool64/cache goos:linux goarch:amd64
_ShardedByteMap_concurrent-2 117ns ± 6%
_Failover_noSyncRead-2 137ns ± 1%
_FailoverSyncRead-2 414ns ± 0%
_FailoverAlwaysBuild-2 1.67µs ± 1%
ShardedMap_Dump-2 3.46µs ± 1%
pkg:github.com/bool64/cache/arena goos:linux goarch:amd64
ConcurrentReadWriter/c10000:g1:w0.00%:*arena.ShardedMapOf[SmallCachedValue]-2 177ns ± 1%
ConcurrentReadWriter/c10000:g1:w0.00%:*cache.ShardedMapOf[SmallCachedValue]-2 181ns ± 1%
ConcurrentReadWriter/c10000:g2:w0.00%:*arena.ShardedMapOf[SmallCachedValue]-2 106ns ± 1%
ConcurrentReadWriter/c10000:g2:w0.00%:*cache.ShardedMapOf[SmallCachedValue]-2 110ns ± 2%
ConcurrentReadWriter/c10000:g2:w0.10%:*arena.ShardedMapOf[SmallCachedValue]-2 109ns ± 1%
ConcurrentReadWriter/c10000:g2:w0.10%:*cache.ShardedMapOf[SmallCachedValue]-2 110ns ± 1%
ConcurrentReadWriter/c10000:g2:w1.00%:*arena.ShardedMapOf[SmallCachedValue]-2 130ns ± 3%
ConcurrentReadWriter/c10000:g2:w1.00%:*cache.ShardedMapOf[SmallCachedValue]-2 121ns ± 1%
ConcurrentReadWriter/c10000:g2:w10.00%:*arena.ShardedMapOf[SmallCachedValue]-2 217ns ± 1%
ConcurrentReadWriter/c10000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 198ns ± 2%
ConcurrentReadWriter/c1000000:g2:w10.00%:*arena.ShardedMapOf[SmallCachedValue]-2 311ns ± 7%
ConcurrentReadWriter/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 263ns ± 3%
pkg:github.com/bool64/cache/bench goos:linux goarch:amd64
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMap)-2 188ns ± 1%
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.SyncMap)-2 194ns ± 1%
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 193ns ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMap)-2 113ns ± 1%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.SyncMap)-2 100ns ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 115ns ± 1%
Concurrent/c1000000:g2:w10.00%:ShardedMap/LRU-2 264ns ± 2%
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMap-2 273ns ± 3%
Concurrent/c1000000:g2:w10.00%:*cache.SyncMap-2 288ns ±17%
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 261ns ± 2%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMap)-2 335ns ± 3%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.SyncMap)-2 451ns ±16%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 354ns ± 1%
name alloc/op
pkg:github.com/bool64/cache goos:linux goarch:amd64
_ShardedByteMap_concurrent-2 3.00B ± 0%
_Failover_noSyncRead-2 0.00B
_FailoverSyncRead-2 160B ± 0%
_FailoverAlwaysBuild-2 447B ± 0%
ShardedMap_Dump-2 1.02kB ± 2%
pkg:github.com/bool64/cache/arena goos:linux goarch:amd64
ConcurrentReadWriter/c10000:g1:w0.00%:*arena.ShardedMapOf[SmallCachedValue]-2 3.00B ± 0%
ConcurrentReadWriter/c10000:g1:w0.00%:*cache.ShardedMapOf[SmallCachedValue]-2 3.00B ± 0%
ConcurrentReadWriter/c10000:g2:w0.00%:*arena.ShardedMapOf[SmallCachedValue]-2 3.00B ± 0%
ConcurrentReadWriter/c10000:g2:w0.00%:*cache.ShardedMapOf[SmallCachedValue]-2 3.00B ± 0%
ConcurrentReadWriter/c10000:g2:w0.10%:*arena.ShardedMapOf[SmallCachedValue]-2 4.00B ± 0%
ConcurrentReadWriter/c10000:g2:w0.10%:*cache.ShardedMapOf[SmallCachedValue]-2 4.00B ± 0%
ConcurrentReadWriter/c10000:g2:w1.00%:*arena.ShardedMapOf[SmallCachedValue]-2 7.00B ± 0%
ConcurrentReadWriter/c10000:g2:w1.00%:*cache.ShardedMapOf[SmallCachedValue]-2 5.00B ± 0%
ConcurrentReadWriter/c10000:g2:w10.00%:*arena.ShardedMapOf[SmallCachedValue]-2 40.0B ± 0%
ConcurrentReadWriter/c10000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 18.0B ± 0%
ConcurrentReadWriter/c1000000:g2:w10.00%:*arena.ShardedMapOf[SmallCachedValue]-2 45.0B ± 0%
ConcurrentReadWriter/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 22.0B ± 0%
pkg:github.com/bool64/cache/bench goos:linux goarch:amd64
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMap)-2 3.00B ± 0%
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.SyncMap)-2 3.00B ± 0%
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 3.00B ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMap)-2 3.00B ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.SyncMap)-2 3.00B ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 3.00B ± 0%
Concurrent/c1000000:g2:w10.00%:ShardedMap/LRU-2 24.0B ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMap-2 24.0B ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.SyncMap-2 36.0B ±22%
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 22.0B ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMap)-2 43.0B ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.SyncMap)-2 68.0B ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 43.0B ± 0%
name allocs/op
pkg:github.com/bool64/cache goos:linux goarch:amd64
_ShardedByteMap_concurrent-2 0.00
_Failover_noSyncRead-2 0.00
_FailoverSyncRead-2 3.00 ± 0%
_FailoverAlwaysBuild-2 11.0 ± 0%
ShardedMap_Dump-2 13.0 ± 0%
pkg:github.com/bool64/cache/arena goos:linux goarch:amd64
ConcurrentReadWriter/c10000:g1:w0.00%:*arena.ShardedMapOf[SmallCachedValue]-2 0.00
ConcurrentReadWriter/c10000:g1:w0.00%:*cache.ShardedMapOf[SmallCachedValue]-2 0.00
ConcurrentReadWriter/c10000:g2:w0.00%:*arena.ShardedMapOf[SmallCachedValue]-2 0.00
ConcurrentReadWriter/c10000:g2:w0.00%:*cache.ShardedMapOf[SmallCachedValue]-2 0.00
ConcurrentReadWriter/c10000:g2:w0.10%:*arena.ShardedMapOf[SmallCachedValue]-2 0.00
ConcurrentReadWriter/c10000:g2:w0.10%:*cache.ShardedMapOf[SmallCachedValue]-2 0.00
ConcurrentReadWriter/c10000:g2:w1.00%:*arena.ShardedMapOf[SmallCachedValue]-2 1.00 ± 0%
ConcurrentReadWriter/c10000:g2:w1.00%:*cache.ShardedMapOf[SmallCachedValue]-2 1.00 ± 0%
ConcurrentReadWriter/c10000:g2:w10.00%:*arena.ShardedMapOf[SmallCachedValue]-2 1.00 ± 0%
ConcurrentReadWriter/c10000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 1.00 ± 0%
ConcurrentReadWriter/c1000000:g2:w10.00%:*arena.ShardedMapOf[SmallCachedValue]-2 1.00 ± 0%
ConcurrentReadWriter/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 1.00 ± 0%
pkg:github.com/bool64/cache/bench goos:linux goarch:amd64
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMap)-2 0.00
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.SyncMap)-2 0.00
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 0.00
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMap)-2 0.00
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.SyncMap)-2 0.00
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 0.00
Concurrent/c1000000:g2:w10.00%:ShardedMap/LRU-2 1.00 ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMap-2 1.00 ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.SyncMap-2 1.00 ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 1.00 ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMap)-2 1.00 ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.SyncMap)-2 2.00 ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 1.00 ± 0%
name MB/inuse
pkg:github.com/bool64/cache goos:linux goarch:amd64
_ShardedByteMap_concurrent-2
_Failover_noSyncRead-2
_FailoverSyncRead-2
_FailoverAlwaysBuild-2
ShardedMap_Dump-2
pkg:github.com/bool64/cache/arena goos:linux goarch:amd64
ConcurrentReadWriter/c10000:g1:w0.00%:*arena.ShardedMapOf[SmallCachedValue]-2 9.80 ± 0%
ConcurrentReadWriter/c10000:g1:w0.00%:*cache.ShardedMapOf[SmallCachedValue]-2 1.75 ± 0%
ConcurrentReadWriter/c10000:g2:w0.00%:*arena.ShardedMapOf[SmallCachedValue]-2 1.72 ± 0%
ConcurrentReadWriter/c10000:g2:w0.00%:*cache.ShardedMapOf[SmallCachedValue]-2 1.76 ± 0%
ConcurrentReadWriter/c10000:g2:w0.10%:*arena.ShardedMapOf[SmallCachedValue]-2 1.73 ± 0%
ConcurrentReadWriter/c10000:g2:w0.10%:*cache.ShardedMapOf[SmallCachedValue]-2 1.77 ± 0%
ConcurrentReadWriter/c10000:g2:w1.00%:*arena.ShardedMapOf[SmallCachedValue]-2 1.75 ± 0%
ConcurrentReadWriter/c10000:g2:w1.00%:*cache.ShardedMapOf[SmallCachedValue]-2 1.76 ± 0%
ConcurrentReadWriter/c10000:g2:w10.00%:*arena.ShardedMapOf[SmallCachedValue]-2 1.73 ± 0%
ConcurrentReadWriter/c10000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 1.76 ± 0%
ConcurrentReadWriter/c1000000:g2:w10.00%:*arena.ShardedMapOf[SmallCachedValue]-2 182 ± 0%
ConcurrentReadWriter/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 180 ± 0%
pkg:github.com/bool64/cache/bench goos:linux goarch:amd64
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMap)-2 2.19 ± 0%
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.SyncMap)-2 2.73 ± 0%
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 2.03 ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMap)-2 2.19 ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.SyncMap)-2 2.71 ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 2.01 ± 0%
Concurrent/c1000000:g2:w10.00%:ShardedMap/LRU-2 195 ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMap-2 196 ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.SyncMap-2 268 ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 181 ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMap)-2 207 ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.SyncMap)-2 280 ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 188 ± 0%
name ms/preload
pkg:github.com/bool64/cache goos:linux goarch:amd64
_ShardedByteMap_concurrent-2
_Failover_noSyncRead-2
_FailoverSyncRead-2
_FailoverAlwaysBuild-2
ShardedMap_Dump-2
pkg:github.com/bool64/cache/arena goos:linux goarch:amd64
ConcurrentReadWriter/c10000:g1:w0.00%:*arena.ShardedMapOf[SmallCachedValue]-2 8.45 ± 0%
ConcurrentReadWriter/c10000:g1:w0.00%:*cache.ShardedMapOf[SmallCachedValue]-2 4.69 ± 0%
ConcurrentReadWriter/c10000:g2:w0.00%:*arena.ShardedMapOf[SmallCachedValue]-2 6.58 ± 0%
ConcurrentReadWriter/c10000:g2:w0.00%:*cache.ShardedMapOf[SmallCachedValue]-2 5.01 ± 0%
ConcurrentReadWriter/c10000:g2:w0.10%:*arena.ShardedMapOf[SmallCachedValue]-2 6.94 ± 0%
ConcurrentReadWriter/c10000:g2:w0.10%:*cache.ShardedMapOf[SmallCachedValue]-2 4.66 ± 0%
ConcurrentReadWriter/c10000:g2:w1.00%:*arena.ShardedMapOf[SmallCachedValue]-2 5.72 ± 0%
ConcurrentReadWriter/c10000:g2:w1.00%:*cache.ShardedMapOf[SmallCachedValue]-2 4.73 ± 0%
ConcurrentReadWriter/c10000:g2:w10.00%:*arena.ShardedMapOf[SmallCachedValue]-2 6.57 ± 0%
ConcurrentReadWriter/c10000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 4.70 ± 0%
ConcurrentReadWriter/c1000000:g2:w10.00%:*arena.ShardedMapOf[SmallCachedValue]-2 1.09k ± 0%
ConcurrentReadWriter/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 871 ± 0%
pkg:github.com/bool64/cache/bench goos:linux goarch:amd64
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMap)-2 15.2 ± 0%
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.SyncMap)-2 18.0 ± 0%
Concurrent/c10000:g1:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 11.9 ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMap)-2 12.3 ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.SyncMap)-2 17.1 ± 0%
Concurrent/c10000:g2:w0.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 12.0 ± 0%
Concurrent/c1000000:g2:w10.00%:ShardedMap/LRU-2 922 ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMap-2 883 ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.SyncMap-2 1.74k ± 0%
Concurrent/c1000000:g2:w10.00%:*cache.ShardedMapOf[SmallCachedValue]-2 786 ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMap)-2 1.58k ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.SyncMap)-2 2.59k ± 0%
Concurrent/c1000000:g2:w10.00%:FailoverRunner(*cache.ShardedMapOf[SmallCachedValue])-2 1.52k ± 0%
Unit Test Coverage
total: (statements) 72.0% changed lines: (statements) 21.6%, coverage is less than 90.0%, consider testing the changes more thoroughly
Coverage of changed lines
| File | Function | Coverage |
|---|---|---|
| Total | 21.6% | |
| arena/sharded_map_go1.20.go | 20.5% | |
| arena/sharded_map_go1.20.go:144 | Write | 100.0% |
| arena/sharded_map_go1.20.go:48 | NewShardedMapOf | 95.7% |
| arena/sharded_map_go1.20.go:119 | Read | 87.0% |
| arena/sharded_map_go1.20.go:89 | Load | 0.0% |
| arena/sharded_map_go1.20.go:105 | Store | 0.0% |
| arena/sharded_map_go1.20.go:166 | Delete | 0.0% |
| arena/sharded_map_go1.20.go:186 | ExpireAll | 0.0% |
| arena/sharded_map_go1.20.go:206 | DeleteAll | 0.0% |
| arena/sharded_map_go1.20.go:224 | deleteExpired | 0.0% |
| arena/sharded_map_go1.20.go:241 | Len | 0.0% |
| arena/sharded_map_go1.20.go:256 | Walk | 0.0% |
| arena/sharded_map_go1.20.go:281 | WalkDumpRestorer | 0.0% |
| arena/sharded_map_go1.20.go:301 | Walk | 0.0% |
| arena/sharded_map_go1.20.go:335 | Dump | 0.0% |
| arena/sharded_map_go1.20.go:347 | Restore | 0.0% |
| arena/sharded_map_go1.20.go:378 | evictMostExpired | 0.0% |
| arena/sharded_map_go1.20.go:384 | evictLeastCounter | 0.0% |
| arena/sharded_map_go1.20.go:391 | evictLeast | 0.0% |
| arena/shared.go | 60.0% | |
| arena/shared.go:22 | ts | 100.0% |
| arena/shared.go:14 | expireAt | 80.0% |
| arena/shared.go:26 | tsTime | 0.0% |
Coverage diff with base branch
| File | Function | Base Coverage | Current Coverage |
|---|---|---|---|
| Total | 78.5% | 72.0% (-6.5%) | |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | Delete | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | DeleteAll | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | Dump | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | ExpireAll | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | Len | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | Load | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | NewShardedMapOf | no function | 90.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | Read | no function | 71.4% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | Restore | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | Store | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | Walk | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | WalkDumpRestorer | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | Write | no function | 100.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | deleteExpired | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | evictLeast | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | evictLeastCounter | no function | 0.0% |
| github.com/bool64/cache/arena/sharded_map_go1.20.go | evictMostExpired | no function | 0.0% |
| github.com/bool64/cache/arena/shared.go | expireAt | no function | 66.7% |
| github.com/bool64/cache/arena/shared.go | ts | no function | 100.0% |
| github.com/bool64/cache/arena/shared.go | tsTime | no function | 0.0% |
Codecov Report
Merging #27 (cfff8bf) into master (c46487b) will decrease coverage by
5.24%. The diff coverage is19.78%.
@@ Coverage Diff @@
## master #27 +/- ##
==========================================
- Coverage 70.08% 64.84% -5.25%
==========================================
Files 28 30 +2
Lines 1608 1795 +187
==========================================
+ Hits 1127 1164 +37
- Misses 408 554 +146
- Partials 73 77 +4
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 64.84% <19.78%> (-5.25%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| arena/sharded_map_go1.20.go | 18.68% <18.68%> (ø) |
|
| arena/shared.go | 60.00% <60.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more