Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkMutexUncontended (0.21 sec)

  1. internal/dsync/dsync_test.go

    		loops = 5
    	}
    	c := make(chan bool)
    	m := NewDRWMutex(ds, "test")
    	for i := 0; i < 10; i++ {
    		go HammerMutex(m, loops, c)
    	}
    	for i := 0; i < 10; i++ {
    		<-c
    	}
    }
    
    func BenchmarkMutexUncontended(b *testing.B) {
    	b.ResetTimer()
    	b.ReportAllocs()
    
    	type PaddedMutex struct {
    		*DRWMutex
    	}
    	b.RunParallel(func(pb *testing.PB) {
    		mu := PaddedMutex{NewDRWMutex(ds, "")}
    		for pb.Next() {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 19 14:35:19 UTC 2024
    - 11.1K bytes
    - Viewed (0)
Back to top