Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for MustHaveParallelism (0.34 sec)

  1. src/internal/testenv/testenv.go

    func HasParallelism() bool {
    	switch runtime.GOOS {
    	case "js", "wasip1":
    		return false
    	}
    	return true
    }
    
    // MustHaveParallelism checks that the current system can execute multiple
    // threads in parallel. If not, MustHaveParallelism calls t.Skip with an explanation.
    func MustHaveParallelism(t testing.TB) {
    	if !HasParallelism() {
    		t.Skipf("skipping test: no parallelism available on %s/%s", runtime.GOOS, runtime.GOARCH)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:41:38 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. src/runtime/pprof/pprof_test.go

    			return false
    		}
    	}
    	for _, ncnt := range n {
    		if ncnt != 0 {
    			return false
    		}
    	}
    	return true
    }
    
    func TestGoroutineProfileConcurrency(t *testing.T) {
    	testenv.MustHaveParallelism(t)
    
    	goroutineProf := Lookup("goroutine")
    
    	profilerCalls := func(s string) int {
    		return strings.Count(s, "\truntime/pprof.runtime_goroutineProfileWithLabels+")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 68.8K bytes
    - Viewed (0)
Back to top