Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkLRU_Freq_NoExpire (0.09 sec)

  1. tests/lru_test.go

    		} else {
    			if _, ok := l.Get(trace[i]); ok {
    				hit++
    			} else {
    				miss++
    			}
    		}
    	}
    	b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(hit+miss))
    }
    
    func BenchmarkLRU_Freq_NoExpire(b *testing.B) {
    	l := lru.NewLRU[int64, int64](8192, nil, 0)
    
    	trace := make([]int64, b.N*2)
    	for i := 0; i < b.N*2; i++ {
    		if i%2 == 0 {
    			trace[i] = getRand(b) % 16384
    		} else {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Sun May 25 07:40:40 UTC 2025
    - 10.4K bytes
    - Viewed (0)
Back to top