Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for StopCPUProfile (0.41 sec)

  1. src/runtime/pprof/pprof.go

    		panic("runtime/pprof: converting profile: " + err.Error())
    	}
    	b.build()
    	cpu.done <- true
    }
    
    // StopCPUProfile stops the current CPU profile, if any.
    // StopCPUProfile only returns after all the writes for the
    // profile have completed.
    func StopCPUProfile() {
    	cpu.Lock()
    	defer cpu.Unlock()
    
    	if !cpu.profiling {
    		return
    	}
    	cpu.profiling = false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  2. src/go/doc/testdata/testing.go

    			f.Close()
    			return
    		}
    		// Could save f so after can call f.Close; not worth the effort.
    	}
    
    }
    
    // after runs after all testing.
    func after() {
    	if *cpuProfile != "" {
    		pprof.StopCPUProfile() // flushes profile to disk
    	}
    	if *memProfile != "" {
    		f, err := os.Create(*memProfile)
    		if err != nil {
    			fmt.Fprintf(os.Stderr, "testing: %s", err)
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 11.8K bytes
    - Viewed (0)
  3. src/net/http/pprof/pprof.go

    		serveError(w, http.StatusInternalServerError,
    			fmt.Sprintf("Could not enable CPU profiling: %s", err))
    		return
    	}
    	sleep(r, time.Duration(sec)*time.Second)
    	pprof.StopCPUProfile()
    }
    
    // Trace responds with the execution trace in binary form.
    // Tracing lasts for duration specified in seconds GET parameter, or for 1 second if not specified.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 17:34:05 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  4. src/cmd/gofmt/gofmt.go

    		if err != nil {
    			s.AddReport(fmt.Errorf("creating cpu profile: %s", err))
    			return
    		}
    		defer func() {
    			f.Close()
    			<-fdSem
    		}()
    		pprof.StartCPUProfile(f)
    		defer pprof.StopCPUProfile()
    	}
    
    	initParserMode()
    	initRewrite()
    
    	args := flag.Args()
    	if len(args) == 0 {
    		if *write {
    			s.AddReport(fmt.Errorf("error: cannot use -w with standard input"))
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  5. src/cmd/link/internal/ld/main.go

    		f, err := os.Create(*cpuprofile)
    		if err != nil {
    			log.Fatalf("%v", err)
    		}
    		if err := pprof.StartCPUProfile(f); err != nil {
    			log.Fatalf("%v", err)
    		}
    		AtExit(func() {
    			pprof.StopCPUProfile()
    			if err = f.Close(); err != nil {
    				log.Fatalf("error closing cpu profile: %v", err)
    			}
    		})
    	}
    	if *memprofile != "" {
    		if *memprofilerate != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/_gen/main.go

    			log.Fatal("could not create CPU profile: ", err)
    		}
    		defer f.Close()
    		if err := pprof.StartCPUProfile(f); err != nil {
    			log.Fatal("could not start CPU profile: ", err)
    		}
    		defer pprof.StopCPUProfile()
    	}
    	if *tracefile != "" {
    		f, err := os.Create(*tracefile)
    		if err != nil {
    			log.Fatalf("failed to create trace output file: %v", err)
    		}
    		defer func() {
    			if err := f.Close(); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 19 22:42:34 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  7. cmd/utils.go

    		f, err := Create(fn)
    		if err != nil {
    			return nil, err
    		}
    		err = pprof.StartCPUProfile(f)
    		if err != nil {
    			return nil, err
    		}
    		prof.stopFn = func() ([]byte, error) {
    			pprof.StopCPUProfile()
    			err := f.Close()
    			if err != nil {
    				return nil, err
    			}
    			defer RemoveAll(dirPath)
    			return ioutilx.ReadFile(fn)
    		}
    	case madmin.ProfilerCPUIO:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 22:00:34 UTC 2024
    - 31.9K bytes
    - Viewed (0)
Back to top