Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for MemProfileRate (0.2 sec)

  1. src/runtime/pprof/protomem_test.go

    	}
    	return funcs
    }
    
    // This is a regression test for https://go.dev/issue/64528 .
    func TestGenericsHashKeyInPprofBuilder(t *testing.T) {
    	previousRate := runtime.MemProfileRate
    	runtime.MemProfileRate = 1
    	defer func() {
    		runtime.MemProfileRate = previousRate
    	}()
    	for _, sz := range []int{128, 256} {
    		genericAllocFunc[uint32](sz / 4)
    	}
    	for _, sz := range []int{32, 64} {
    		genericAllocFunc[uint64](sz / 8)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 14:38:45 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/ld_test.go

    // runtime.MemProfileRate, which this test checks.
    func TestMemProfileCheck(t *testing.T) {
    	testenv.MustHaveGoBuild(t)
    	t.Parallel()
    
    	tests := []struct {
    		name    string
    		prog    string
    		wantOut string
    	}{
    		{
    			"no_memprofile",
    			`
    package main
    import "runtime"
    func main() {
    	println(runtime.MemProfileRate)
    }
    `,
    			"0",
    		},
    		{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 05:45:53 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  3. src/cmd/link/internal/ld/main.go

    	cpuprofile        = flag.String("cpuprofile", "", "write cpu profile to `file`")
    	memprofile        = flag.String("memprofile", "", "write memory profile to `file`")
    	memprofilerate    = flag.Int64("memprofilerate", 0, "set runtime.MemProfileRate to `rate`")
    	benchmarkFlag     = flag.String("benchmark", "", "set to 'mem' or 'cpu' to enable phase benchmarking")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  4. src/cmd/covdata/covdata.go

    var cpuprofileflag = flag.String("cpuprofile", "", "Write CPU profile to specified file")
    var memprofileflag = flag.String("memprofile", "", "Write memory profile to specified file")
    var memprofilerateflag = flag.Int("memprofilerate", 0, "Set memprofile sampling rate to value")
    
    var matchpkg func(name string) bool
    
    var atExitFuncs []func()
    
    func atExit(f func()) {
    	atExitFuncs = append(atExitFuncs, f)
    }
    
    func Exit(code int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  5. src/runtime/pprof/mprof_test.go

    	rv.Call(nil)
    }
    
    var memoryProfilerRun = 0
    
    func TestMemoryProfiler(t *testing.T) {
    	// Disable sampling, otherwise it's difficult to assert anything.
    	oldRate := runtime.MemProfileRate
    	runtime.MemProfileRate = 1
    	defer func() {
    		runtime.MemProfileRate = oldRate
    	}()
    
    	// Allocate a meg to ensure that mcache.nextSample is updated to 1.
    	for i := 0; i < 1024; i++ {
    		memSink = make([]byte, 1024)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 16 15:20:22 UTC 2022
    - 5.3K bytes
    - Viewed (0)
  6. src/runtime/testdata/testprog/memprof.go

    	"runtime/pprof"
    )
    
    func init() {
    	register("MemProf", MemProf)
    }
    
    var memProfBuf bytes.Buffer
    var memProfStr string
    
    func MemProf() {
    	// Force heap sampling for determinism.
    	runtime.MemProfileRate = 1
    
    	for i := 0; i < 10; i++ {
    		fmt.Fprintf(&memProfBuf, "%*d\n", i, i)
    	}
    	memProfStr = memProfBuf.String()
    
    	runtime.GC()
    
    	f, err := os.CreateTemp("", "memprof")
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 09 19:12:23 UTC 2020
    - 869 bytes
    - Viewed (0)
  7. src/go/doc/testdata/testing.go

    	memProfile     = flag.String("test.memprofile", "", "write a memory profile to the named file after execution")
    	memProfileRate = flag.Int("test.memprofilerate", 0, "if >=0, sets runtime.MemProfileRate")
    	cpuProfile     = flag.String("test.cpuprofile", "", "write a cpu profile to the named file during execution")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 11.8K bytes
    - Viewed (0)
  8. src/cmd/go/internal/test/flagdefs.go

    	"fullpath":             true,
    	"fuzz":                 true,
    	"fuzzminimizetime":     true,
    	"fuzztime":             true,
    	"list":                 true,
    	"memprofile":           true,
    	"memprofilerate":       true,
    	"mutexprofile":         true,
    	"mutexprofilefraction": true,
    	"outputdir":            true,
    	"parallel":             true,
    	"run":                  true,
    	"short":                true,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 01:02:40 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/testsanitizers/testdata/msan4.go

    void poison() __attribute__ ((weak));
    
    // Poison the stack.
    void poison() {
    	char a[1024];
    	Nop(&a[0]);
    }
    
    */
    import "C"
    
    import (
    	"runtime"
    )
    
    func main() {
    	runtime.MemProfileRate = 1
    	start(100)
    }
    
    func start(i int) {
    	if i == 0 {
    		return
    	}
    	C.poison()
    	// Tie up a thread.
    	// We won't actually wait for this sleep to complete.
    	go func() { C.sleep(1) }()
    	start(i - 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 878 bytes
    - Viewed (0)
  10. test/chan/select2.go

    	}
    }
    
    func receiver(c, dummy chan int, n int) {
    	for i := 0; i < n; i++ {
    		select {
    		case <-c:
    			// nothing
    		case <-dummy:
    			panic("dummy")
    		}
    	}
    }
    
    func main() {
    	runtime.MemProfileRate = 0
    
    	c := make(chan int)
    	dummy := make(chan int)
    
    	// warm up
    	go sender(c, 100000)
    	receiver(c, dummy, 100000)
    	runtime.GC()
    	memstats := new(runtime.MemStats)
    	runtime.ReadMemStats(memstats)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 1K bytes
    - Viewed (0)
Back to top