Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for cpuList (0.08 sec)

  1. src/testing/testing.go

    		}
    		cpu, err := strconv.Atoi(val)
    		if err != nil || cpu <= 0 {
    			fmt.Fprintf(os.Stderr, "testing: invalid value %q for -test.cpu\n", val)
    			os.Exit(1)
    		}
    		cpuList = append(cpuList, cpu)
    	}
    	if cpuList == nil {
    		cpuList = append(cpuList, runtime.GOMAXPROCS(-1))
    	}
    }
    
    func shouldFailFast() bool {
    	return *failFast && numFailed.Load() > 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 76.1K bytes
    - Viewed (0)
  2. src/testing/benchmark.go

    	// If no flag was specified, don't run benchmarks.
    	if len(*matchBenchmarks) == 0 {
    		return true
    	}
    	// Collect matching benchmarks and determine longest name.
    	maxprocs := 1
    	for _, procs := range cpuList {
    		if procs > maxprocs {
    			maxprocs = procs
    		}
    	}
    	ctx := &benchContext{
    		match:  newMatcher(matchString, *matchBenchmarks, "-test.bench", *skip),
    		extLen: len(benchmarkName("", maxprocs)),
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23.9K bytes
    - Viewed (0)
Back to top