Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 227 for nprocs (0.17 sec)

  1. src/cmd/cgo/internal/test/issue18146.go

    	// It is not defined on Solaris.
    	var nproc int
    	setNproc := true
    	switch runtime.GOOS {
    	default:
    		setNproc = false
    	case "aix":
    		nproc = 9
    	case "linux":
    		nproc = 6
    	case "darwin", "dragonfly", "freebsd", "netbsd", "openbsd":
    		nproc = 7
    	}
    	if setNproc {
    		var rlim syscall.Rlimit
    		if syscall.Getrlimit(nproc, &rlim) == nil {
    			max := int(rlim.Cur) / (threads + 5)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:32 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  2. internal/net/net.go

    package net
    
    import (
    	"fmt"
    
    	"github.com/prometheus/procfs"
    )
    
    // GetInterfaceNetStats - get procfs.NetDevLine by interfaceName
    func GetInterfaceNetStats(interf string) (procfs.NetDevLine, error) {
    	proc, err := procfs.Self()
    	if err != nil {
    		return procfs.NetDevLine{}, err
    	}
    	netDev, err := proc.NetDev()
    	if err != nil {
    		return procfs.NetDevLine{}, err
    	}
    	ndl, ok := netDev[interf]
    	if !ok {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jul 17 08:14:01 UTC 2023
    - 1.2K 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. pkg/util/procfs/doc.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    // Package procfs implements utility functions relating to the /proc mount.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 16 17:48:21 UTC 2016
    - 708 bytes
    - Viewed (0)
  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. src/runtime/chan_test.go

    				<-myc
    			}
    		}
    	})
    }
    
    func benchmarkChanSync(b *testing.B, work int) {
    	const CallsPerSched = 1000
    	procs := 2
    	N := int32(b.N / CallsPerSched / procs * procs)
    	c := make(chan bool, procs)
    	myc := make(chan int)
    	for p := 0; p < procs; p++ {
    		go func() {
    			for {
    				i := atomic.AddInt32(&N, -1)
    				if i < 0 {
    					break
    				}
    				for g := 0; g < CallsPerSched; g++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:47:35 UTC 2023
    - 23.4K bytes
    - Viewed (0)
  8. src/go/doc/testdata/benchmark.go

    			os.Exit(1)
    		}
    		if !matched {
    			continue
    		}
    		for _, procs := range cpuList {
    			runtime.GOMAXPROCS(procs)
    			b := &B{
    				common: common{
    					signal: make(chan any),
    				},
    				benchmark: Benchmark,
    			}
    			benchName := Benchmark.Name
    			if procs != 1 {
    				benchName = fmt.Sprintf("%s-%d", Benchmark.Name, procs)
    			}
    			fmt.Printf("%s\t", benchName)
    			r := b.run()
    			if b.failed {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  9. 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)
  10. platforms/jvm/language-java/src/test/groovy/org/gradle/api/internal/tasks/compile/AnnotationProcessorDiscoveringCompilerTest.groovy

            given:
            def proc1 = Stub(AnnotationProcessorDeclaration)
            def proc2 = Stub(AnnotationProcessorDeclaration)
            detector.detectProcessors(_) >> [
                "Foo": proc1,
                "Bar": proc2
            ]
    
            when:
            compiler.execute(spec)
    
            then:
            spec.effectiveAnnotationProcessors == [proc1, proc2] as Set
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Aug 28 11:40:18 UTC 2023
    - 4.1K bytes
    - Viewed (0)
Back to top