go1.5でtracing
前回作成したテストを使ってtracingしてみた。パフォーマンスチューニングとかの分析時に役立ちそう。
データの可視化にHTML/ブラウザ使うのは(よくある方法だけど)うまい方法だなぁと思う。
$ cd gotest $ go test -trace=trace.out . ok _/パス.../gotest 0.248s $ go tool trace gotest.test trace.out
ブラウザが起動する。
http://127.0.0.1:58976/
出力する項目は以下の6項目。
- View trace
- Goroutine analysis
- Network blocking profile
- Synchronization blocking profile
- Syscall blocking profile
- Scheduler latency profile
View traceの結果です。