func (m *Metrics) Report(w io.Writer) {
	if m == nil {
		return
	}

	m.closeMark()

	gcString := ""
	if m.gc == GC {
		gcString = "_GC"
	}

	var totTime time.Duration
	for _, curMark := range m.marks {
		dur := curMark.endT.Sub(curMark.startT)
		totTime += dur
		fmt.Fprintf(w, "%s 1 %d ns/op", makeBenchString(curMark.name+gcString), dur.Nanoseconds())
		fmt.Fprintf(w, "\t%d B/op", curMark.endM.TotalAlloc-curMark.startM.TotalAlloc)
		fmt.Fprintf(w, "\t%d allocs/op", curMark.endM.Mallocs-curMark.startM.Mallocs)
		if m.gc == GC {
			fmt.Fprintf(w, "\t%d live-B", curMark.gcM.HeapAlloc)
		} else {
			fmt.Fprintf(w, "\t%d heap-B", curMark.endM.HeapAlloc)
		}
		fmt.Fprintf(w, "\n")
	}
	fmt.Fprintf(w, "%s 1 %d ns/op\n", makeBenchString("total time"+gcString), totTime.Nanoseconds())
}
// Report reports the metrics.
// Closes the currently Start(ed) range, and writes the report to the given io.Writer.
Report reports the metrics.
Closes the currently Start(ed) range, and writes the report to the given io.Writer.
// Report reports the metrics . // Closes the currently Start ( ed ) range and writes the report to the given io . Writer .
func (m *Metrics) Report(w io.Writer) {
	if m == nil {
		return
	}
	m.closeMark()
	gcString := ""
	if m.gc == GC {
		gcString = "_GC"
	}
	var totTime time.Duration
	for _, curMark := range m.marks {
		dur := curMark.endT.Sub(curMark.startT)
		totTime += dur
		fmt.Fprintf(w, "%s 1 %d ns/op", makeBenchString(curMark.name+gcString), dur.Nanoseconds())
		fmt.Fprintf(w, "\t%d B/op", curMark.endM.TotalAlloc-curMark.startM.TotalAlloc)
		fmt.Fprintf(w, "\t%d allocs/op", curMark.endM.Mallocs-curMark.startM.Mallocs)
		if m.gc == GC {
			fmt.Fprintf(w, "\t%d live-B", curMark.gcM.HeapAlloc)
		} else {
			fmt.Fprintf(w, "\t%d heap-B", curMark.endM.HeapAlloc)
		}
		fmt.Fprintf(w, "\n")
	}
	fmt.Fprintf(w, "%s 1 %d ns/op\n", makeBenchString("total time"+gcString), totTime.Nanoseconds())
}
func ( m * Metrics ) Report ( w io . Writer ) { if m == nil { return } m . closeMark ( ) gcString := " " if m . gc == GC { gcString = " " } var totTime time . Duration for _ , curMark := range m . marks { dur := curMark . endT . Sub ( curMark . startT ) totTime += dur fmt . Fprintf ( w , " " , makeBenchString ( curMark . name + gcString ) , dur . Nanoseconds ( ) ) fmt . Fprintf ( w , " \t " , curMark . endM . TotalAlloc - curMark . startM . TotalAlloc ) fmt . Fprintf ( w , " \t " , curMark . endM . Mallocs - curMark . startM . Mallocs ) if m . gc == GC { fmt . Fprintf ( w , " \t " , curMark . gcM . HeapAlloc ) } else { fmt . Fprintf ( w , " \t " , curMark . endM . HeapAlloc ) } fmt . Fprintf ( w , " \n " ) } fmt . Fprintf ( w , " \n " , makeBenchString ( " " + gcString ) , totTime . Nanoseconds ( ) ) }
Report reports the metrics.
Report reports the metrics .