Official Go implementation of the Ethereum protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
go-ethereum/log/format_test.go

22 lines
350 B

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())
}
}