Skip to content

Commit

Permalink
worker: update benchmark results
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Feb 22, 2024
1 parent cfb8cb6 commit 67a6c87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions worker/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (z *zeroReader) Read(p []byte) (n int, err error) {
// BenchmarkUploaderSingleObject benchmarks uploading a single object.
//
// Speed | CPU | Commit
// 232.97 MB/s | M2 Pro | 26d3119
// 433.86 MB/s | M2 Pro | bae6e77
func BenchmarkUploaderSingleObject(b *testing.B) {
w := newMockWorker()

Expand All @@ -46,7 +46,7 @@ func BenchmarkUploaderSingleObject(b *testing.B) {
// BenchmarkUploaderSingleObject benchmarks uploading one object per slab.
//
// Speed | CPU | Commit
// 185.10 MB/s | M2 Pro | 26d3119
// 282.47 MB/s | M2 Pro | bae6e77
func BenchmarkUploaderMultiObject(b *testing.B) {
w := newMockWorker()

Expand Down Expand Up @@ -75,7 +75,7 @@ func BenchmarkUploaderMultiObject(b *testing.B) {
// slabs.
//
// Speed | CPU | Commit
// 1668.87 MB/s | M2 Pro | 26d3119
// 1658.49 MB/s | M2 Pro | bae6e77
func BenchmarkSectorRoot30Goroutines(b *testing.B) {
data := make([]byte, rhpv2.SectorSize)
b.SetBytes(int64(rhpv2.SectorSize))
Expand Down Expand Up @@ -108,7 +108,7 @@ func BenchmarkSectorRoot30Goroutines(b *testing.B) {
// BenchmarkSectorRootSingleGoroutine benchmarks the SectorRoot function.
//
// Speed | CPU | Commit
// 176.91 MB/s | M2 Pro | 26d3119
// 177.33 MB/s | M2 Pro | bae6e77
func BenchmarkSectorRootSingleGoroutine(b *testing.B) {
data := make([]byte, rhpv2.SectorSize)
b.SetBytes(rhpv2.SectorSize)
Expand Down
6 changes: 6 additions & 0 deletions worker/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,12 @@ func (u *upload) newSlabUpload(ctx context.Context, shards [][]byte, uploaders [
sCtx, sCancel := context.WithCancel(ctx)

// create the sector
// NOTE: we are computing the sector root here and pass it all the
// way down to the RPC to avoid having to recompute it for the proof
// verification. This is necessary because we need it ahead of time
// for the call to AddUploadingSector in uploader.go
// Once we upload to temp storage we don't need AddUploadingSector
// anymore and can move it back to the RPC.
sectors[idx] = &sectorUpload{
data: (*[rhpv2.SectorSize]byte)(shards[idx]),
index: idx,
Expand Down

0 comments on commit 67a6c87

Please sign in to comment.