Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +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))
- chore: update benchmark tests to use testing.B.Loop for improved performance ([filecoin-project/lotus#13385](https://github.com/filecoin-project/lotus/pull/13385))([filecoin-project/lotus#13396](https://github.com/filecoin-project/lotus/pull/13396))
Comment thread
rvagg marked this conversation as resolved.
Outdated
- 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))

Expand Down
16 changes: 8 additions & 8 deletions chain/state/statetree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ func BenchmarkStateTreeSet(b *testing.B) {
b.ResetTimer()
b.ReportAllocs()

for i := 0; i < b.N; i++ {
a, err := address.NewIDAddress(uint64(i))
for b.Loop() {
a, err := address.NewIDAddress(uint64(b.N))
if err != nil {
b.Fatal(err)
}
err = st.SetActor(a, &types.Actor{
Balance: types.NewInt(1258812523),
Code: builtin2.StorageMinerActorCodeID,
Head: builtin2.AccountActorCodeID,
Nonce: uint64(i),
Nonce: uint64(b.N),
})
if err != nil {
b.Fatal(err)
Expand All @@ -58,16 +58,16 @@ func BenchmarkStateTreeSetFlush(b *testing.B) {
b.ResetTimer()
b.ReportAllocs()

for i := 0; i < b.N; i++ {
a, err := address.NewIDAddress(uint64(i))
for b.Loop() {
a, err := address.NewIDAddress(uint64(b.N))
if err != nil {
b.Fatal(err)
}
err = st.SetActor(a, &types.Actor{
Balance: types.NewInt(1258812523),
Code: builtin2.StorageMinerActorCodeID,
Head: builtin2.AccountActorCodeID,
Nonce: uint64(i),
Nonce: uint64(b.N),
})
if err != nil {
b.Fatal(err)
Expand Down Expand Up @@ -214,8 +214,8 @@ func BenchmarkStateTree10kGetActor(b *testing.B) {
b.ResetTimer()
b.ReportAllocs()

for i := 0; i < b.N; i++ {
a, err := address.NewIDAddress(uint64(i % 10000))
for b.Loop() {
a, err := address.NewIDAddress(uint64(b.N % 10000))
if err != nil {
b.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions chain/types/electionproof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ func BenchmarkWinCounts(b *testing.B) {

b.ResetTimer()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
ep.VRFProof = []byte{byte(i), byte(i >> 8), byte(i >> 16), byte(i >> 24), byte(i >> 32)}
for b.Loop() {
ep.VRFProof = []byte{byte(b.N), byte(b.N >> 8), byte(b.N >> 16), byte(b.N >> 24), byte(b.N >> 32)}
j := ep.ComputeWinCount(power, totalPower)
res += j
}
Expand Down
2 changes: 1 addition & 1 deletion chain/types/ethtypes/eth_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ func stringPtr(s string) *string {
func BenchmarkEthHashFromCid(b *testing.B) {
c := cid.MustParse("bafy2bzacedwviarjtjraqakob5pslltmuo5n3xev3nt5zylezofkbbv5jclyu")

for i := 0; i < b.N; i++ {
for b.Loop() {
_, err := EthHashFromCid(c)
if err != nil {
b.Fatalf("Error in EthHashFromCid: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion chain/types/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func BenchmarkSerializeMessage(b *testing.B) {
}

b.ReportAllocs()
for i := 0; i < b.N; i++ {
for b.Loop() {
_, err := m.Serialize()
if err != nil {
b.Fatal(err)
Expand Down
4 changes: 2 additions & 2 deletions lib/shardedmutex/shardedmutex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func BenchmarkShardedMutex(b *testing.B) {
}

b.ResetTimer()
for i := 0; i < b.N; i++ {
for b.Loop() {
sm.Lock(1)
sm.Unlock(1)
}
Expand Down Expand Up @@ -151,7 +151,7 @@ func BenchmarkShardedMutexOf(b *testing.B) {
}

b.ResetTimer()
for i := 0; i < b.N; i++ {
for b.Loop() {
sm.Lock(str2)
sm.Unlock(str2)
}
Expand Down
Loading