- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for StopCPUProfile (0.38 sec)
-
src/cmd/cgo/internal/testcarchive/testdata/libgo6/sigprof.go
import ( "io" "runtime/pprof" ) import "C" //export go_start_profile func go_start_profile() { pprof.StartCPUProfile(io.Discard) } //export go_stop_profile func go_stop_profile() { pprof.StopCPUProfile() } func main() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 404 bytes - Viewed (0) -
src/cmd/pprof/testdata/cpu.go
if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(2) } defer f.Close() if err := pprof.StartCPUProfile(f); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(2) } defer pprof.StopCPUProfile() // Spin for long enough to collect some samples. start := time.Now() for time.Since(start) < time.Second { }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 17 14:53:37 UTC 2021 - 792 bytes - Viewed (0) -
src/runtime/testdata/testprog/timeprof.go
os.Exit(2) } t0 := time.Now() // We should get a profiling signal 100 times a second, // so running for 1/10 second should be sufficient. for time.Since(t0) < time.Second/10 { } pprof.StopCPUProfile() name := f.Name() if err := f.Close(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(2) } fmt.Println(name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 09 19:12:23 UTC 2020 - 813 bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/aprof.go
if time.Since(start) > time.Second { break } } C.CallGoNop() } c <- true }() var buf bytes.Buffer pprof.StartCPUProfile(&buf) c <- true <-c pprof.StopCPUProfile() fmt.Println("OK")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 19 16:23:54 UTC 2022 - 1.1K bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/pprof.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 12 19:45:58 UTC 2021 - 1.7K bytes - Viewed (0) -
src/runtime/testdata/testprog/vdso.go
} t0 := time.Now() t1 := t0 // We should get a profiling signal 100 times a second, // so running for 1 second should be sufficient. for t1.Sub(t0) < time.Second { t1 = time.Now() } pprof.StopCPUProfile() name := f.Name() if err := f.Close(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(2) } if err := os.Remove(name); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(2) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Jul 30 16:04:50 UTC 2022 - 1005 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/tsan9.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.3K bytes - Viewed (0) -
src/testing/internal/testdeps/deps.go
if err != nil { return } } return matchRe.MatchString(str), nil } func (TestDeps) StartCPUProfile(w io.Writer) error { return pprof.StartCPUProfile(w) } func (TestDeps) StopCPUProfile() { pprof.StopCPUProfile() } func (TestDeps) WriteProfileTo(name string, w io.Writer, debug int) error { return pprof.Lookup(name).WriteTo(w, debug) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 14:01:23 UTC 2024 - 6.2K bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/tsan13.go
"runtime/pprof" "unsafe" ) func main() { runtime.SetCgoTraceback(0, unsafe.Pointer(C.tsanTraceback), nil, nil) pprof.StartCPUProfile(io.Discard) C.runThreads(C.int(runtime.GOMAXPROCS(0))) pprof.StopCPUProfile()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.7K bytes - Viewed (0) -
src/runtime/pprof/testdata/mappingtest/main.go
go cpuHogCFunction() runtime.Gosched() if err := pprof.StartCPUProfile(os.Stdout); err != nil { log.Fatal("can't start CPU profile: ", err) } time.Sleep(200 * time.Millisecond) pprof.StopCPUProfile() if err := os.Stdout.Close(); err != nil { log.Fatal("can't write CPU profile: ", err) } } var salt1 int var salt2 int func cpuHogGoFunction() { for { foo := salt1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 08 02:40:04 UTC 2019 - 2K bytes - Viewed (0)