Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestConvertCPUProfileNoSamples (0.26 sec)

  1. src/runtime/pprof/proto_test.go

    // It works reasonably well for printing protocol-buffer
    // data structures like profile.Profile.
    func fmtJSON(x any) string {
    	js, _ := json.MarshalIndent(x, "", "\t")
    	return string(js)
    }
    
    func TestConvertCPUProfileNoSamples(t *testing.T) {
    	// A test server with mock cpu profile data.
    	var buf bytes.Buffer
    
    	b := []uint64{3, 0, 500} // empty profile at 500 Hz (2ms sample period)
    	p, err := translateCPUProfile(b, 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 23:21:53 UTC 2024
    - 17K bytes
    - Viewed (0)
Back to top