Skip to content

Commit

Permalink
Attestation aggregation: removes redundant code from max-cover benchm…
Browse files Browse the repository at this point in the history
…arks (#8044)

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
farazdagi and prylabs-bulldozer[bot] committed Dec 4, 2020
1 parent be078d6 commit 57b7428
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions shared/aggregation/attestations/attestations_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,63 +30,42 @@ func BenchmarkAggregateAttestations_Aggregate(b *testing.B) {
tests := []struct {
name string
inputs []bitfield.Bitlist
want []bitfield.Bitlist
}{
{
name: "64 attestations with single bit set",
inputs: aggtesting.BitlistsWithSingleBitSet(64, bitlistLen),
want: []bitfield.Bitlist{
aggtesting.BitlistWithAllBitsSet(64),
},
},
{
name: "64 attestations with 8 random bits set",
inputs: aggtesting.BitlistsWithMultipleBitSet(b, 64, bitlistLen, 8),
want: []bitfield.Bitlist{
aggtesting.BitlistWithAllBitsSet(64),
},
},
{
name: "64 attestations with 16 random bits set",
inputs: aggtesting.BitlistsWithMultipleBitSet(b, 64, bitlistLen, 16),
want: []bitfield.Bitlist{
aggtesting.BitlistWithAllBitsSet(64),
},
},
{
name: "64 attestations with 32 random bits set",
inputs: aggtesting.BitlistsWithMultipleBitSet(b, 64, bitlistLen, 32),
want: []bitfield.Bitlist{
aggtesting.BitlistWithAllBitsSet(64),
},
},
{
name: "256 attestations with 32 random bits set",
inputs: aggtesting.BitlistsWithMultipleBitSet(b, 256, bitlistLen, 32),
},
{
name: "128 attestations with single bit set",
inputs: aggtesting.BitlistsWithSingleBitSet(128, bitlistLen),
want: []bitfield.Bitlist{
aggtesting.BitlistWithAllBitsSet(128),
},
},
{
name: "256 attestations with single bit set",
inputs: aggtesting.BitlistsWithSingleBitSet(256, bitlistLen),
want: []bitfield.Bitlist{
aggtesting.BitlistWithAllBitsSet(256),
},
},
{
name: "512 attestations with single bit set",
inputs: aggtesting.BitlistsWithSingleBitSet(512, bitlistLen),
want: []bitfield.Bitlist{
aggtesting.BitlistWithAllBitsSet(512),
},
},
{
name: "1024 attestations with single bit set",
inputs: aggtesting.BitlistsWithSingleBitSet(1024, bitlistLen),
want: []bitfield.Bitlist{
aggtesting.BitlistWithAllBitsSet(1024),
},
},
}

Expand Down

0 comments on commit 57b7428

Please sign in to comment.