dotgraph.go (go1.19.src) | : | dotgraph.go (go1.19.1.src) | ||
---|---|---|---|---|
skipping to change at line 388 | skipping to change at line 388 | |||
g = value * (1 - saturation*score) | g = value * (1 - saturation*score) | |||
} | } | |||
b = value * (1 - saturation) | b = value * (1 - saturation) | |||
return fmt.Sprintf("#%02x%02x%02x", uint8(r*255.0), uint8(g*255.0), uint8 (b*255.0)) | return fmt.Sprintf("#%02x%02x%02x", uint8(r*255.0), uint8(g*255.0), uint8 (b*255.0)) | |||
} | } | |||
func multilinePrintableName(info *NodeInfo) string { | func multilinePrintableName(info *NodeInfo) string { | |||
infoCopy := *info | infoCopy := *info | |||
infoCopy.Name = escapeForDot(ShortenFunctionName(infoCopy.Name)) | infoCopy.Name = escapeForDot(ShortenFunctionName(infoCopy.Name)) | |||
infoCopy.Name = strings.Replace(infoCopy.Name, "::", `\n`, -1) | infoCopy.Name = strings.Replace(infoCopy.Name, "::", `\n`, -1) | |||
// Go type parameters are reported as "[...]" by Go pprof profiles. | ||||
// Keep this ellipsis rather than replacing with newlines below. | ||||
infoCopy.Name = strings.Replace(infoCopy.Name, "[...]", "[…]", -1) | ||||
infoCopy.Name = strings.Replace(infoCopy.Name, ".", `\n`, -1) | infoCopy.Name = strings.Replace(infoCopy.Name, ".", `\n`, -1) | |||
if infoCopy.File != "" { | if infoCopy.File != "" { | |||
infoCopy.File = filepath.Base(infoCopy.File) | infoCopy.File = filepath.Base(infoCopy.File) | |||
} | } | |||
return strings.Join(infoCopy.NameComponents(), `\n`) + `\n` | return strings.Join(infoCopy.NameComponents(), `\n`) + `\n` | |||
} | } | |||
// collapsedTags trims and sorts a slice of tags. | // collapsedTags trims and sorts a slice of tags. | |||
func (b *builder) collapsedTags(ts []*Tag, count int, flatTags bool) []*Tag { | func (b *builder) collapsedTags(ts []*Tag, count int, flatTags bool) []*Tag { | |||
ts = SortTags(ts, flatTags) | ts = SortTags(ts, flatTags) | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 3 lines changed or added |