First of all, I'm new to pprof and this whole thing might be because I've
simply misunderstood something basic. I've been spending a couple of hours
on this now, and am unable to get any useful data or any data resembling
what is described in the blog-post by Russ Cox: Profiling Go Programs<http://blog.golang.org/2011/06/profiling-go-programs.html>
1) I download this repo that I'm interested in:
go get github.com/paddie/godoku
2) It has a nice benchmark that I wanna use for
profiling: BenchmarkSolveHard (takes around 50 seconds on my machine)
?> go test -c && ./godoku.test -test.cpuprofile=tmp.prof
BenchmarkSolveHard 1 46624956000 ns/op
3) I run the pprof tool on the godoku.test binary and the tmp.prof:
go tool pprof godoku.test tmp.prof
4) i type top10 and I get this, which has nothing to do with what I've
written, and it is definitely not where my program spent most of its time:
Total: 3831 samples
3830 100.0% 100.0% 3831 100.0% fmt.(*operator++).printReflectValue
1 0.0% 100.0% 1 0.0% reflect.valueInterface
0 0.0% 100.0% 1 0.0% fmt.(*operator++).doPrintf
0 0.0% 100.0% 439 11.5% fmt.(*operator++).printField
0 0.0% 100.0% 1 0.0% reflect.Value.Interface
0 0.0% 100.0% 1 0.0% time.Now
If anyone has any clue as to what I'm not getting, or if I've messed
anything up in the above, I'd be incredibly grateful.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/groups/opt_out.