Пример #1
0
func PrintGraph(w io.Writer, r *report.Reporter, exe string) {
	col := report.ColCPU
	switch {
	case allocObj:
		col = report.ColAllocObj
	case allocSpace:
		col = report.ColAllocBytes
	case inuseObj:
		col = report.ColLiveObj
	case inuseSpace:
		col = report.ColLiveBytes
	}
	g := r.GraphByFunc(col)
	report := report.GraphReport{
		Prog:  exe,
		Total: r.Total(col),
		Unit:  "samples",
		Graph: g,

		NodeFrac: .005,
		EdgeFrac: .001,
	}
	report.WriteTo(w)
}