I generate a trace like this:
func main() {
f, err := os.Create("trace.out")
if err != nil {
panic(err)
}
defer f.Close()
err = trace.Start(f)
if err != nil {
panic(err)
}
defer trace.Stop()
//this is my app:
http.HandleFunc("/", someFunc)
log.Fatal(http.ListenAndServe(":5000", nil))
}
Then i run in the CLI:
$ go run main.go
Refresh browser, trace.out is generated, 1.8 MB, then:
$ go tool trace trace.out
018/09/09 13:25:18 Parsing trace...
failed to parse trace: no EvFrequency event
What am I missing here? Thanks.