-
Notifications
You must be signed in to change notification settings - Fork 294
Open
Description
First, thanks for this cool project! Seems that there is a bug when reading from the Go's memory profile:
package main
import (
"fmt"
"net/http"
_ "net/http/pprof"
)
func hello(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "hello\n")
}
func headers(w http.ResponseWriter, req *http.Request) {
for name, headers := range req.Header {
for _, h := range headers {
fmt.Fprintf(w, "%v: %v\n", name, h)
}
}
}
func main() {
http.HandleFunc("/hello", hello)
http.HandleFunc("/headers", headers)
http.ListenAndServe(":8090", nil)
}curl http://127.0.0.1:8090/debug/pprof/heap\?seconds\=10 > heap_profileWhen loading the heap_profile, error occurs:
Failed to load format Error: Samples must have positive weights
at n.appendSampleWithWeight (speedscope.026f36b0.js:174)
at r (/import.e3a73ef4.js:107)
at /import.e3a73ef4.js:115
at Generator.next (<anonymous>)
at s (/import.e3a73ef4.js:115)
Metadata
Metadata
Assignees
Labels
No labels