Go程序運行時分析數據:gometry

jopen 10年前發布 | 12K 次閱讀 gometry Google Go/Golang開發

一個可視化界面對來自Go程序運行時數據進行分析。

gometry screenshot

Installation

go get github.com/rakyll/gometry/cmd/gometry

The program you're willing to profile should import the github.com/rakyll/gometry/http package. The http package will register several handlers to provide information about your program during runtime.

import _ "github.com/rakyll/gometry/http"

// If your application is not already running an http server, you need to start one. 
go func() {
    log.Println(http.ListenAndServe("localhost:6060", nil))
}()

Now, you are ready to launch the gometry.

$ gometry

Point your browser to http://localhost:6464.

Goals

  • Building a lightweight tool that works well with live profiles is a necessity. Over the time, I recognized that a lot of people around me delayed to use the existing pprof tools because it's a tedious experience.
  • gometry has no ambition to provide the features at the granularity of the features of the command line tools. Users should feel free to fallback to go tool pprof if they need more sophisticated features. gometry should also provide interfaces to let the users to export their profile data and continue to work with the go tool.
  • Allow users to filter, hide and ignore by symbol names. Make it easier to generate graphs, make it easier to browse extremely large image files.
  • Allow users to work with their custom user profiles.
  • Increase the awareness around profiling tools/packages in Go.
  • Provide additional lightweight stats where possible.

項目主頁:http://www.baiduhome.net/lib/view/home/1418011089073

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!