mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
log: fix issues with benchmarks (#30667)
This commit is contained in:
parent
54f8e028ca
commit
5bfaf068a4
1 changed files with 1 additions and 2 deletions
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"math/big"
|
"math/big"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -70,7 +69,7 @@ func TestJSONHandler(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkTraceLogging(b *testing.B) {
|
func BenchmarkTraceLogging(b *testing.B) {
|
||||||
SetDefault(NewLogger(NewTerminalHandler(os.Stderr, true)))
|
SetDefault(NewLogger(NewTerminalHandler(io.Discard, true)))
|
||||||
b.ResetTimer()
|
b.ResetTimer()
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
Trace("a message", "v", i)
|
Trace("a message", "v", i)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue