Explorar el Código

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 hace 8 años
padre
commit
05fe768186
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      internal/report/report.go

+ 1
- 1
internal/report/report.go Ver fichero

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