mirror of https://github.com/ethereum/go-ethereum
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.
22 lines
350 B
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())
|
|
}
|
|
}
|
|
|