diff --git a/CHANGELOG.md b/CHANGELOG.md index e8dd5ebfae3..219eaad5f6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - chore(deps): update of quic-go to v0.54.1 and go-libp2p to v0.43.0 ([filecoin-project/lotus#13361](https://github.com/filecoin-project/lotus/pull/13361)) - feat(spcli): add a `deposit-margin-factor` option to `lotus-miner actor new` and `lotus-shed miner create` so the sent deposit still covers the on-chain requirement if it rises between lookup and execution - feat(cli): lotus evm deploy prints message CID ([filecoin-project/lotus#13378](https://github.com/filecoin-project/lotus/pull/13378)) +- chore: update benchmark tests to use testing.B.Loop for improved performance ([filecoin-project/lotus#13385](https://github.com/filecoin-project/lotus/pull/13385)) - fix(eth): properly return vm error in all gas estimation methods ([filecoin-project/lotus#13389](https://github.com/filecoin-project/lotus/pull/13389)) - chore: all actor cmd support --actor ([filecoin-project/lotus#13391](https://github.com/filecoin-project/lotus/pull/13391)) diff --git a/chain/store/store_test.go b/chain/store/store_test.go index 2c95a570d7d..02dcf1cf5b8 100644 --- a/chain/store/store_test.go +++ b/chain/store/store_test.go @@ -84,7 +84,7 @@ func BenchmarkGetRandomness(b *testing.B) { b.ResetTimer() - for i := 0; i < b.N; i++ { + for b.Loop() { _, err := cg.StateManager().GetRandomnessFromTickets(context.TODO(), crypto.DomainSeparationTag_SealRandomness, 500, nil, last.Key()) if err != nil { b.Fatal(err) diff --git a/chain/sync_test.go b/chain/sync_test.go index 8ede128a3dc..f44b34b8678 100644 --- a/chain/sync_test.go +++ b/chain/sync_test.go @@ -899,7 +899,7 @@ func TestMatchedNoncesRobustID(t *testing.T) { } func BenchmarkSyncBasic(b *testing.B) { - for i := 0; i < b.N; i++ { + for b.Loop() { runSyncBenchLength(b, 100) } } diff --git a/chain/types/blockheader_test.go b/chain/types/blockheader_test.go index 1f4c9e0674e..f1b3c14dd76 100644 --- a/chain/types/blockheader_test.go +++ b/chain/types/blockheader_test.go @@ -129,7 +129,7 @@ func BenchmarkBlockHeaderMarshal(b *testing.B) { b.ReportAllocs() buf := new(bytes.Buffer) - for i := 0; i < b.N; i++ { + for b.Loop() { buf.Reset() if err := bh.MarshalCBOR(buf); err != nil { b.Fatal(err)