runtime/pprof, runtime/trace: stub some additional functions
These are necessary to import some parts of the net/http package.
Этот коммит содержится в:
родитель
e955aa1941
коммит
e09bd5abb3
2 изменённых файлов: 26 добавлений и 2 удалений
|
@ -10,8 +10,7 @@ import (
|
||||||
|
|
||||||
var ErrUnimplemented = errors.New("runtime/pprof: unimplemented")
|
var ErrUnimplemented = errors.New("runtime/pprof: unimplemented")
|
||||||
|
|
||||||
type Profile struct {
|
type Profile struct{}
|
||||||
}
|
|
||||||
|
|
||||||
func StartCPUProfile(w io.Writer) error {
|
func StartCPUProfile(w io.Writer) error {
|
||||||
return nil
|
return nil
|
||||||
|
@ -28,6 +27,18 @@ func Lookup(name string) *Profile {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *Profile) Name() string {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *Profile) Count() int {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (p *Profile) WriteTo(w io.Writer, debug int) error {
|
func (p *Profile) WriteTo(w io.Writer, debug int) error {
|
||||||
return ErrUnimplemented
|
return ErrUnimplemented
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Profiles() []*Profile {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
13
src/runtime/trace/trace.go
Обычный файл
13
src/runtime/trace/trace.go
Обычный файл
|
@ -0,0 +1,13 @@
|
||||||
|
// Stubs for the runtime/trace package
|
||||||
|
package trace
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"io"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Start(w io.Writer) error {
|
||||||
|
return errors.New("not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
func Stop() {}
|
Загрузка…
Создание таблицы
Сослаться в новой задаче