Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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)) ([filecoin-project/lotus#13396](https://github.com/filecoin-project/lotus/pull/13396))
- 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)) ([filecoin-project/lotus#13405](https://github.com/filecoin-project/lotus/pull/13405))
- 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
4 changes: 2 additions & 2 deletions lib/sigs/bls/bls_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func BenchmarkBLSSign(b *testing.B) {
signer := blsSigner{}
for i := 0; i < b.N; i++ {
for b.Loop() {
b.StopTimer()
pk, _ := signer.GenPrivate()
randMsg := make([]byte, 32)
Expand All @@ -23,7 +23,7 @@ func BenchmarkBLSSign(b *testing.B) {

func BenchmarkBLSVerify(b *testing.B) {
signer := blsSigner{}
for i := 0; i < b.N; i++ {
for b.Loop() {
b.StopTimer()
randMsg := make([]byte, 32)
_, _ = rand.Read(randMsg)
Expand Down
6 changes: 3 additions & 3 deletions storage/sealer/ffiwrapper/sealer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ func BenchmarkWriteWithAlignment(b *testing.B) {
bt := abi.UnpaddedPieceSize(2 * 127 * 1024 * 1024)
b.SetBytes(int64(bt))

for i := 0; i < b.N; i++ {
for b.Loop() {
b.StopTimer()
rf, w, _ := mock.ToReadableFile(bytes.NewReader(bytes.Repeat([]byte{0xff, 0}, int(bt/2))), int64(bt))
tf, _ := os.CreateTemp("/tmp/", "scrb-")
Expand Down Expand Up @@ -772,11 +772,11 @@ func BenchmarkAddPiece512M(b *testing.B) {
}
b.Cleanup(cleanup)

for i := 0; i < b.N; i++ {
for b.Loop() {
c, err := sb.AddPiece(context.TODO(), storiface.SectorRef{
ID: abi.SectorID{
Miner: miner,
Number: abi.SectorNumber(i),
Number: abi.SectorNumber(b.N),
},
ProofType: abi.RegisteredSealProof_StackedDrg512MiBV1_1,
}, nil, sz, io.LimitReader(&nullreader.Reader{}, int64(sz)))
Expand Down
14 changes: 7 additions & 7 deletions storage/sealer/fr32/fr32_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func BenchmarkPadChunk(b *testing.B) {

b.SetBytes(127)

for i := 0; i < b.N; i++ {
for b.Loop() {
fr32.Pad(in, buf[:])
}
}
Expand All @@ -167,7 +167,7 @@ func BenchmarkChunkRoundtrip(b *testing.B) {

b.SetBytes(127)

for i := 0; i < b.N; i++ {
for b.Loop() {
fr32.Pad(buf[:], buf[:])
fr32.Unpad(buf[:], out[:])
}
Expand All @@ -185,7 +185,7 @@ func BenchmarkUnpadChunk(b *testing.B) {

bs := buf[:]

for i := 0; i < b.N; i++ {
for b.Loop() {
fr32.Unpad(bs, out[:])
}
}
Expand All @@ -202,7 +202,7 @@ func BenchmarkUnpad16MChunk(b *testing.B) {
b.ReportAllocs()
b.ResetTimer()

for i := 0; i < b.N; i++ {
for b.Loop() {
fr32.Unpad(buf[:], out[:])
}
}
Expand All @@ -218,7 +218,7 @@ func BenchmarkPad16MChunk(b *testing.B) {
b.ReportAllocs()
b.ResetTimer()

for i := 0; i < b.N; i++ {
for b.Loop() {
fr32.Pad(in, buf[:])
}
}
Expand All @@ -234,7 +234,7 @@ func BenchmarkPad1GChunk(b *testing.B) {
b.ReportAllocs()
b.ResetTimer()

for i := 0; i < b.N; i++ {
for b.Loop() {
fr32.Pad(in, buf[:])
}
}
Expand All @@ -251,7 +251,7 @@ func BenchmarkUnpad1GChunk(b *testing.B) {
b.ReportAllocs()
b.ResetTimer()

for i := 0; i < b.N; i++ {
for b.Loop() {
fr32.Unpad(buf[:], out[:])
}
}
2 changes: 1 addition & 1 deletion storage/sealer/sched_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ func BenchmarkTrySched(b *testing.B) {

test := func(windows, queue int) func(b *testing.B) {
return func(b *testing.B) {
for i := 0; i < b.N; i++ {
for b.Loop() {
b.StopTimer()

var whnd api.WorkerStruct
Expand Down