Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Foo (0.14 sec)

  1. internal/dsync/dsync_test.go

    	mu := NewDRWMutex(ds, "")
    	if slack {
    		b.SetParallelism(10)
    	}
    	b.RunParallel(func(pb *testing.PB) {
    		foo := 0
    		for pb.Next() {
    			mu.Lock(id, source)
    			mu.Unlock(context.Background())
    			if work {
    				for i := 0; i < 100; i++ {
    					foo *= 2
    					foo /= 2
    				}
    			}
    		}
    		_ = foo
    	})
    }
    
    func BenchmarkMutex(b *testing.B) {
    	benchmarkMutex(b, false, false)
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
Back to top