Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkConcurrent (0.27 sec)

  1. src/log/log_test.go

    // but copied here to avoid the io.Discard optimization in Logger.
    type discard struct{}
    
    func (discard) Write(p []byte) (int, error) {
    	return len(p), nil
    }
    
    func BenchmarkConcurrent(b *testing.B) {
    	l := New(discard{}, "prefix: ", Ldate|Ltime|Lmicroseconds|Llongfile|Lmsgprefix)
    	var group sync.WaitGroup
    	for i := runtime.NumCPU(); i > 0; i-- {
    		group.Add(1)
    		go func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 21 20:04:37 UTC 2023
    - 7.4K bytes
    - Viewed (0)
Back to top