浏览代码

Fixs tests for updated report label

Wade Simba Khadder 8 年前
父节点
当前提交
8b643ccdaa
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. 1
    1
      internal/driver/testdata/pprof.cpusmall.flat.addresses.tree
  2. 1
    2
      internal/report/report.go

+ 1
- 1
internal/driver/testdata/pprof.cpusmall.flat.addresses.tree 查看文件

@@ -1,5 +1,5 @@
1 1
 Showing nodes accounting for 4s, 100% of 4s total
2
-Showing top 4 nodes out of 5 (cum >= 2s)
2
+Showing top 4 nodes out of 5
3 3
 ----------------------------------------------------------+-------------
4 4
       flat  flat%   sum%        cum   cum%   calls calls% + context 	 	 
5 5
 ----------------------------------------------------------+-------------

+ 1
- 2
internal/report/report.go 查看文件

@@ -827,8 +827,7 @@ func reportLabels(rpt *Report, g *graph.Graph, origCount, droppedNodes, droppedE
827 827
 		}
828 828
 		if nodeCount > 0 && nodeCount < origCount {
829 829
 			label = append(label, fmt.Sprintf("Showing top %d nodes out of %d",
830
-				nodeCount, origCount,
831
-				rpt.formatValue(g.Nodes[len(g.Nodes)-1].Cum)))
830
+				nodeCount, origCount))
832 831
 		}
833 832
 	}
834 833
 	return label