core: remove ResetTimer when used in conjuction with Loop

This commit is contained in:
lightclient 2025-09-19 16:51:34 -06:00
parent 5adf9dced1
commit 4d354f3fff
No known key found for this signature in database
GPG key ID: 657913021EF45A6A
2 changed files with 0 additions and 4 deletions

View file

@ -326,7 +326,6 @@ func benchReadChain(b *testing.B, full bool, count uint64) {
db.Close() db.Close()
options := DefaultConfig().WithArchive(true) options := DefaultConfig().WithArchive(true)
b.ReportAllocs() b.ReportAllocs()
b.ResetTimer()
for b.Loop() { for b.Loop() {
pdb, err = pebble.New(dir, 1024, 128, "", false) pdb, err = pebble.New(dir, 1024, 128, "", false)
if err != nil { if err != nil {

View file

@ -149,7 +149,6 @@ func BenchmarkHashing(b *testing.B) {
var got common.Hash var got common.Hash
var hasher = sha3.NewLegacyKeccak256() var hasher = sha3.NewLegacyKeccak256()
b.Run("iteratorhashing", func(b *testing.B) { b.Run("iteratorhashing", func(b *testing.B) {
b.ResetTimer()
for b.Loop() { for b.Loop() {
var hash common.Hash var hash common.Hash
it, err := rlp.NewListIterator(bodyRlp) it, err := rlp.NewListIterator(bodyRlp)
@ -172,7 +171,6 @@ func BenchmarkHashing(b *testing.B) {
}) })
var exp common.Hash var exp common.Hash
b.Run("fullbodyhashing", func(b *testing.B) { b.Run("fullbodyhashing", func(b *testing.B) {
b.ResetTimer()
for b.Loop() { for b.Loop() {
var body types.Body var body types.Body
rlp.DecodeBytes(bodyRlp, &body) rlp.DecodeBytes(bodyRlp, &body)
@ -182,7 +180,6 @@ func BenchmarkHashing(b *testing.B) {
} }
}) })
b.Run("fullblockhashing", func(b *testing.B) { b.Run("fullblockhashing", func(b *testing.B) {
b.ResetTimer()
for b.Loop() { for b.Loop() {
var block types.Block var block types.Block
rlp.DecodeBytes(blockRlp, &block) rlp.DecodeBytes(blockRlp, &block)