mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
22 lines
350 B
Go
22 lines
350 B
Go
package log
|
|
|
|
import (
|
|
"math/rand"
|
|
"testing"
|
|
)
|
|
|
|
var sink string
|
|
|
|
func BenchmarkPrettyInt64Logfmt(b *testing.B) {
|
|
b.ReportAllocs()
|
|
for i := 0; i < b.N; i++ {
|
|
sink = FormatLogfmtInt64(rand.Int63())
|
|
}
|
|
}
|
|
|
|
func BenchmarkPrettyUint64Logfmt(b *testing.B) {
|
|
b.ReportAllocs()
|
|
for i := 0; i < b.N; i++ {
|
|
sink = FormatLogfmtUint64(rand.Uint64())
|
|
}
|
|
}
|