瀏覽代碼

Makes Report Label use the actual node count

Before this change, the node count used in the label is the proposed amount
provided by the user. If some nodes were trimmed and the graph ended up with
less nodes than the user asked for, the report label will now reflect this.
Wade Simba Khadder 8 年之前
父節點
當前提交
05fe768186
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      internal/report/report.go

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

@@ -798,7 +798,7 @@ func ProfileLabels(rpt *Report) []string {
798 798
 func reportLabels(rpt *Report, g *graph.Graph, origCount, droppedNodes, droppedEdges int, fullHeaders bool) []string {
799 799
 	nodeFraction := rpt.options.NodeFraction
800 800
 	edgeFraction := rpt.options.EdgeFraction
801
-	nodeCount := rpt.options.NodeCount
801
+	nodeCount := len(g.Nodes)
802 802
 
803 803
 	var label []string
804 804
 	if len(rpt.options.ProfileLabels) > 0 {