- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 138 for Gomaxprocs (0.34 sec)
-
src/internal/trace/testdata/testprog/gomaxprocs.go
// Start tracing. if err := trace.Start(os.Stdout); err != nil { log.Fatalf("failed to start tracing: %v", err) } // Run GOMAXPROCS a bunch of times, up and down. for i := 1; i <= 16; i *= 2 { runtime.GOMAXPROCS(i) time.Sleep(1 * time.Millisecond) } for i := 16; i >= 1; i /= 2 { runtime.GOMAXPROCS(i) time.Sleep(1 * time.Millisecond) } // Stop tracing. trace.Stop()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 967 bytes - Viewed (0) -
src/internal/trace/testdata/testprog/stress-start-stop.go
// blocked goroutines, LockOSThread, pipes, and GOMAXPROCS). //go:build ignore package main import ( "bytes" "io" "log" "net" "os" "runtime" "runtime/trace" "sync" "time" ) func main() { defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(8)) outerDone := make(chan bool) go func() { defer func() { outerDone <- true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.7K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/stress.go
// license that can be found in the LICENSE file. // Tests a many interesting cases (network, syscalls, a little GC, busy goroutines, // blocked goroutines, LockOSThread, pipes, and GOMAXPROCS). //go:build ignore package main import ( "log" "net" "os" "runtime" "runtime/trace" "sync" "time" ) func main() { var wg sync.WaitGroup done := make(chan bool)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.5K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/stacks.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.4K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/futile-wakeup.go
"log" "os" "runtime" "runtime/trace" "sync" ) func main() { if err := trace.Start(os.Stdout); err != nil { log.Fatalf("failed to start tracing: %v", err) } 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
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 1.8K bytes - Viewed (0) -
src/runtime/debug.go
package runtime import ( "internal/runtime/atomic" "unsafe" ) // GOMAXPROCS sets the maximum number of CPUs that can be executing // simultaneously and returns the previous setting. It defaults to // the value of [runtime.NumCPU]. If n < 1, it does not change the current setting. // This call will go away when the scheduler improves. func GOMAXPROCS(n int) int { if GOARCH == "wasm" && n > 1 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 11 20:38:24 UTC 2024 - 4.2K bytes - Viewed (0) -
src/runtime/gc_test.go
func applyGCLoad(b *testing.B) func() { // We’ll apply load to the runtime with maxProcs-1 goroutines // and use one more to actually benchmark. It doesn't make sense // to try to run this test with only 1 P (that's what // BenchmarkReadMemStats is for). maxProcs := runtime.GOMAXPROCS(-1) if maxProcs == 1 { b.Skip("This benchmark can only be run with GOMAXPROCS > 1") } // Code to build a big tree with lots of pointers.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 05 22:33:52 UTC 2024 - 17.6K bytes - Viewed (0) -
cmd/speedtest.go
// operations for now to begin with. if concurrency < 4 { concurrency = 4 } // if GOMAXPROCS is set to a lower value then choose to use // concurrency == GOMAXPROCS instead. if runtime.GOMAXPROCS(0) < concurrency { concurrency = runtime.GOMAXPROCS(0) } } throughputHighestGet := uint64(0) throughputHighestPut := uint64(0)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon May 06 09:45:10 UTC 2024 - 9.2K bytes - Viewed (0) -
src/runtime/metrics_test.go
fn: func(t *testing.T) { runtime.GC() }, }, { name: "runtime.GOMAXPROCS", fn: func(t *testing.T) { if runtime.GOARCH == "wasm" { t.Skip("GOMAXPROCS >1 not supported on wasm") } n := runtime.GOMAXPROCS(0) defer runtime.GOMAXPROCS(n) runtime.GOMAXPROCS(n + 1) }, }, { name: "runtime.GoroutineProfile", fn: func(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 45K bytes - Viewed (0) -
cmd/untar.go
"github.com/klauspost/compress/s2" "github.com/klauspost/compress/zstd" gzip "github.com/klauspost/pgzip" "github.com/pierrec/lz4" ) // Max bzip2 concurrency across calls. 50% of GOMAXPROCS. var bz2Limiter = pbzip2.CreateConcurrencyPool((runtime.GOMAXPROCS(0) + 1) / 2) func detect(r *bufio.Reader) format { z, err := r.Peek(4) if err != nil { return formatUnknown } for _, f := range magicHeaders {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Apr 04 12:04:40 UTC 2024 - 6K bytes - Viewed (0)