Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for Procs (0.04 sec)

  1. src/internal/trace/testdata/testprog/gc-stress.go

    	for i := range ballast {
    		ballast[i] = new([1024]*node)
    		for j := range ballast[i] {
    			ballast[i][j] = &node{
    				data: [128]byte{1, 2, 3, 4},
    			}
    		}
    	}
    
    	procs := runtime.GOMAXPROCS(-1)
    	sink = make([][]byte, procs)
    
    	for i := 0; i < procs; i++ {
    		i := i
    		go func() {
    			for {
    				sink[i] = make([]byte, 4<<10)
    			}
    		}()
    	}
    	// Increase the chance that we end up starting and stopping
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  2. src/internal/trace/testdata/testprog/futile-wakeup.go

    	}
    
    	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(8))
    	c0 := make(chan int, 1)
    	c1 := make(chan int, 1)
    	c2 := make(chan int, 1)
    	const procs = 2
    	var done sync.WaitGroup
    	done.Add(4 * procs)
    	for p := 0; p < procs; p++ {
    		const iters = 1e3
    		go func() {
    			trace.WithRegion(context.Background(), "special", func() {
    				for i := 0; i < iters; i++ {
    					runtime.Gosched()
    					c0 <- 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. src/syscall/exec_plan9.go

    // running process to exit.
    func WaitProcess(pid int, w *Waitmsg) (err error) {
    	procs.Lock()
    	ch := procs.waits[pid]
    	procs.Unlock()
    
    	var wmsg *waitErr
    	if ch != nil {
    		wmsg = <-ch
    		procs.Lock()
    		if procs.waits[pid] == ch {
    			delete(procs.waits, pid)
    		}
    		procs.Unlock()
    	}
    	if wmsg == nil {
    		// ch was missing or ch is closed
    		return NewError("process not found")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. pilot/pkg/features/tuning.go

    				"If set to 0 or unset, the max will be automatically determined based on the machine size",
    		).Get()
    		if v > 0 {
    			return v
    		}
    		procs := runtime.GOMAXPROCS(0)
    		// Heuristic to scale with cores. We end up with...
    		// 1: 20
    		// 2: 25
    		// 4: 35
    		// 32: 100
    		return min(15+5*procs, 100)
    	}()
    
    	RequestLimit = func() float64 {
    		v := env.Register(
    			"PILOT_MAX_REQUESTS_PER_SECOND",
    			0.0,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 06 04:22:19 UTC 2024
    - 4.8K bytes
    - Viewed (1)
  5. src/internal/trace/gc.go

    					series = len(out)
    					out = append(out, []MutatorUtil{{int64(ev.Time()), 1}})
    				}
    				ps = append(ps, perP{series: series})
    			}
    			if len(procs) == 0 || gomaxprocs != procs[len(procs)-1].n {
    				procs = append(procs, procsCount{time: int64(ev.Time()), n: gomaxprocs})
    			}
    		}
    		if len(ps) == 0 {
    			// We can't start doing any analysis until we see what GOMAXPROCS is.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 26K bytes
    - Viewed (0)
  6. src/testing/benchmark_test.go

    	}
    	testing.Benchmark(func(b *testing.B) {
    		procs := uint32(0)
    		iters := uint64(0)
    		b.SetParallelism(3)
    		b.RunParallel(func(pb *testing.PB) {
    			atomic.AddUint32(&procs, 1)
    			for pb.Next() {
    				atomic.AddUint64(&iters, 1)
    			}
    		})
    		if want := uint32(3 * runtime.GOMAXPROCS(0)); procs != want {
    			t.Errorf("got %v procs, want %v", procs, want)
    		}
    		if iters != uint64(b.N) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  7. cni/pkg/repair/netns.go

    	}
    
    	fs, err := procfs.NewFS("/host/proc")
    	if err != nil {
    		return "", fmt.Errorf("read procfs: %v", err)
    	}
    	procs, err := fs.AllProcs()
    	if err != nil {
    		return "", fmt.Errorf("read procs: %v", err)
    	}
    	oldest := uint64(math.MaxUint64)
    	best := ""
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 04:07:10 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. src/internal/trace/testdata/testprog/stress.go

    	}()
    	time.Sleep(time.Millisecond) // give the goroutine above time to block
    
    	if err := trace.Start(os.Stdout); err != nil {
    		log.Fatalf("failed to start tracing: %v", err)
    	}
    	defer trace.Stop()
    
    	procs := runtime.GOMAXPROCS(10)
    	time.Sleep(50 * time.Millisecond) // test proc stop/start events
    
    	go func() {
    		runtime.LockOSThread()
    		for {
    			select {
    			case <-done:
    				return
    			default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  9. src/testing/benchmark.go

    	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)
  10. src/cmd/trace/procgen.go

    		}
    	}
    	// TODO(mknyszek): Consider modeling procs differently and have them be
    	// transition to and from NotExist when GOMAXPROCS changes. We can emit
    	// events for this to clearly delineate GOMAXPROCS changes.
    
    	if viewerEv.Name != "" {
    		ctx.Instant(viewerEv)
    	}
    }
    
    func (g *procGenerator) Finish(ctx *traceContext) {
    	ctx.SetResourceType("PROCS")
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top