MCPcopy Create free account
hub / github.com/goinaction/code / BenchmarkFormat

Function BenchmarkFormat

chapter9/listing28/listing28_test.go:26–34  ·  view source on GitHub ↗

BenchmarkFormat provides performance numbers for the strconv.FormatInt function.

(b *testing.B)

Source from the content-addressed store, hash-verified

24// BenchmarkFormat provides performance numbers for the
25// strconv.FormatInt function.
26func BenchmarkFormat(b *testing.B) {
27 number := int64(10)
28
29 b.ResetTimer()
30
31 for i := 0; i < b.N; i++ {
32 strconv.FormatInt(number, 10)
33 }
34}
35
36// BenchmarkItoa provides performance numbers for the
37// strconv.Itoa function.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected