Skip to content

Commit

Permalink
fix ristretto tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phuslu committed Sep 22, 2024
1 parent 0e09cc5 commit a829a2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func BenchmarkCcacheSetGet(b *testing.B) {

func BenchmarkRistrettoSetGet(b *testing.B) {
c := perfbench.Open(b)
cache, _ := ristretto.NewCache(&ristretto.Config{
cache, _ := ristretto.NewCache(&ristretto.Config[string, int]{
NumCounters: 10 * cachesize, // number of keys to track frequency of (10M).
MaxCost: cachesize, // maximum cost of cache (1M).
BufferItems: 64, // number of keys per Get buffer.
Expand Down Expand Up @@ -615,7 +615,7 @@ func SetupEcache(cachesize int) {

func SetupRistretto(cachesize int) {
defer debug.SetGCPercent(debug.SetGCPercent(-1))
cache, _ := ristretto.NewCache(&ristretto.Config{
cache, _ := ristretto.NewCache(&ristretto.Config[string, int]{
NumCounters: int64(10 * cachesize), // number of keys to track frequency of (10M).
MaxCost: int64(cachesize), // maximum cost of cache (1M).
BufferItems: 64, // number of keys per Get buffer.
Expand Down Expand Up @@ -816,7 +816,7 @@ func SetupEcache(cachesize int) {
}

func SetupRistretto(cachesize int) {
cache, _ := ristretto.NewCache(&ristretto.Config{
cache, _ := ristretto.NewCache(&ristretto.Config[string, int]{
NumCounters: int64(10 * cachesize), // number of keys to track frequency of (10M).
MaxCost: int64(cachesize), // maximum cost of cache (1M).
BufferItems: 64, // number of keys per Get buffer.
Expand Down

0 comments on commit a829a2a

Please sign in to comment.