code: func ProfileLabels(rpt *Report) []string {
  	label := []string{}
  	prof := rpt.prof
  	o := rpt.options
  	if len(prof.Mapping) > 0 {
  		if prof.Mapping[0].File != "" {
  			label = append(label, "File: "+filepath.Base(prof.Mapping[0].File))
  		}
  		if prof.Mapping[0].BuildID != "" {
  			label = append(label, "Build ID: "+prof.Mapping[0].BuildID)
  		}
  	}
  	// Only include comments that do not start with '#'.
  	for _, c := range prof.Comments {
  		if !strings.HasPrefix(c, "#") {
  			label = append(label, c)
  		}
  	}
  	if o.SampleType != "" {
  		label = append(label, "Type: "+o.SampleType)
  	}
  	if prof.TimeNanos != 0 {
  		const layout = "Jan 2, 2006 at 3:04pm (MST)"
  		label = append(label, "Time: "+time.Unix(0, prof.TimeNanos).Format(layout))
  	}
  	if prof.DurationNanos != 0 {
  		duration := measurement.Label(prof.DurationNanos, "nanoseconds")
  		totalNanos, totalUnit := measurement.Scale(rpt.total, o.SampleUnit, "nanoseconds")
  		var ratio string
  		if totalUnit == "ns" && totalNanos != 0 {
  			ratio = "(" + measurement.Percentage(int64(totalNanos), prof.DurationNanos) + ")"
  		}
  		label = append(label, fmt.Sprintf("Duration: %s, Total samples = %s %s", duration, rpt.formatValue(rpt.total), ratio))
  	}
  	return label
  }
docs: // ProfileLabels returns printable labels for a profile.