MCPcopy
hub / github.com/uber-go/zap / String

Method String

internal/readme/readme.go:213–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211}
212
213func (b *benchmarkRow) String() string {
214 pct := func(val, baseline int64) string {
215 return fmt.Sprintf(
216 "%+0.f%%",
217 ((float64(val)/float64(baseline))*100)-100,
218 )
219 }
220 t := b.Time.Nanoseconds()
221 tp := pct(t, b.ZapTime.Nanoseconds())
222
223 return fmt.Sprintf(
224 "| %s | %d ns/op | %s | %d allocs/op", b.Name,
225 t, tp, b.AllocatedObjects,
226 )
227}
228
229type benchmarkRowsByTime []*benchmarkRow
230

Callers 2

getBenchmarkRowsFunction · 0.45
TakeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected