quefukang.com quefukang.com $ go tool pprof http://localhost:6060/debug/pprof/heapFetching profile from http://localhost:6060/debug/pprof/heapSaved profile in /Users/ruifengyun/pprof/pprof.localhost:6060.inuse_objects.inuse_space.032.pb.gzEntering interactive mode (type "help" for commands)(pprof) help Commands: cmd [n] [--cum] [focus_regex]* [-ignore_regex]* Produce a text report with the top n entries. Include samples matching focus_regex, and exclude ignore_regex. Add --cum to sort using cumulative data. Available commands: callgrind Outputs a graph in callgrind format disasm Output annotated assembly for functions matching regexp or address dot Outputs a graph in DOT format eog Visualize graph through eog evince Visualize graph through evince gif Outputs a graph image in GIF format gv Visualize graph through gv list Output annotated source for functions matching regexp pdf Outputs a graph in PDF format peek Output callers/callees of functions matching regexp png Outputs a graph image in PNG format proto Outputs the profile in compressed protobuf format ps Outputs a graph in PS format raw Outputs a text representation of the raw profile svg Outputs a graph in SVG format tags Outputs all tags in the profile text Outputs top entries in text form top Outputs top entries in text form tree Outputs a text rendering of call graph web Visualize graph through web browser weblist Output annotated source in HTML for functions matching regexp or address peek func_regex Display callers and callees of functions matching func_regex. dot [n] [focus_regex]* [-ignore_regex]* [file] Produce an annotated callgraph with the top n entries. Include samples matching focus_regex, and exclude ignore_regex. For other outputs, replace dot with: - Graphic formats: dot, svg, pdf, ps, gif, png (use to name output file) - Graph viewer: gv, web, evince, eog callgrind [n] [focus_regex]* [-ignore_regex]* [file] Produce a file in callgrind-compatible format. Include samples matching focus_regex, and exclude ignore_regex. weblist func_regex [-ignore_regex]* Show annotated source with interspersed assembly in a web browser. list func_regex [-ignore_regex]* Print source for routines matching func_regex, and exclude ignore_regex. disasm func_regex [-ignore_regex]* Disassemble routines matching func_regex, and exclude ignore_regex. tags tag_regex [-ignore_regex]* List tags with key:value matching tag_regex and exclude ignore_regex. quit/exit/^D Exit pprof. option=value The following options can be set individually: cum/flat: Sort entries based on cumulative or flat data call_tree: Build context-sensitive call trees nodecount: Max number of entries to display nodefraction: Min frequency ratio of nodes to display edgefraction: Min frequency ratio of edges to display focus/ignore: Regexp to include/exclude samples by name/file tagfocus/tagignore: Regexp or value range to filter samples by tag eg "1mb", "1mb:2mb", ":64kb" functions: Level of aggregation for sample data files: lines: addresses: unit: Measurement unit to use on reports Sample value selection by index: sample_index: Index of sample value to display mean: Average sample value over first value Sample value selection by name: alloc_space for heap profiles alloc_objects inuse_space inuse_objects total_delay for contention profiles mean_delay contentions : Clear focus/ignore/hide/tagfocus/tagignore(pprof)
依照 pprof的统计信息咋们 能够 找出 CPU过分 盘算 及内存走漏 的也许 的点。 现在 越发 以为 Golang gc有一些 让人摸不清头脑 . 由此可见 有必-要 深入 学习 Golang gc废物 回-收 理由 .
END… ….