code: func (b *builder) addEdge(edge *Edge, from, to int, hasNodelets bool) {
  	var inline string
  	if edge.Inline {
  		inline = `\n (inline)`
  	}
  	w := b.config.FormatValue(edge.WeightValue())
  	attr := fmt.Sprintf(`label=" %s%s"`, w, inline)
  	if b.config.Total != 0 {
  		// Note: edge.weight > b.config.Total is possible for profile diffs.
  		if weight := 1 + int(min64(abs64(edge.WeightValue()*100/b.config.Total), 100)); weight > 1 {
  			attr = fmt.Sprintf(`%s weight=%d`, attr, weight)
  		}
  		if width := 1 + int(min64(abs64(edge.WeightValue()*5/b.config.Total), 5)); width > 1 {
  			attr = fmt.Sprintf(`%s penwidth=%d`, attr, width)
  		}
  		attr = fmt.Sprintf(`%s color="%s"`, attr,
  			dotColor(float64(edge.WeightValue())/float64(abs64(b.config.Total)), false))
  	}
  	arrow := "->"
  	if edge.Residual {
  		arrow = "..."
  	}
  	tooltip := fmt.Sprintf(`"%s %s %s (%s)"`,
  		edge.Src.Info.PrintableName(), arrow, edge.Dest.Info.PrintableName(), w)
  	attr = fmt.Sprintf(`%s tooltip=%s labeltooltip=%s`, attr, tooltip, tooltip)
  
  	if edge.Residual {
  		attr = attr + ` style="dotted"`
  	}
  
  	if hasNodelets {
  		// Separate children further if source has tags.
  		attr = attr + " minlen=2"
  	}
  
  	fmt.Fprintf(b, "N%d -> N%d [%s]\n", from, to, attr)
  }
docs: // addEdge generates a graph edge in DOT format.