github.com/gopherjs/gopherjs@v1.19.0-beta1.0.20240506212314-27071a8796e4/compiler/natives/src/runtime/pprof/pprof.go (about) 1 //go:build js 2 // +build js 3 4 package pprof 5 6 import ( 7 "io" 8 "sync" 9 ) 10 11 type Profile struct { 12 name string 13 mu sync.Mutex 14 m map[interface{}][]uintptr 15 count func() int 16 write func(io.Writer, int) error 17 } 18 19 func (p *Profile) WriteTo(w io.Writer, debug int) error { 20 return nil 21 } 22 23 func (p *Profile) Count() int { 24 return 0 25 } 26 27 func (p *Profile) Name() string { 28 return "" 29 } 30 31 func (p *Profile) Add(value interface{}, skip int) { 32 } 33 34 func (p *Profile) Remove(value interface{}) { 35 } 36 37 func StartCPUProfile(w io.Writer) error { 38 return nil 39 } 40 41 func StopCPUProfile() { 42 } 43 44 func WriteHeapProfile(w io.Writer) error { 45 return nil 46 } 47 48 func Lookup(name string) *Profile { 49 return nil 50 }