mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 10:41:19 +00:00
748d513c62
* proper error checking and type assertions
24 lines
468 B
Go
24 lines
468 B
Go
package kv_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/operations/attestations/kv"
|
|
)
|
|
|
|
func BenchmarkAttCaches(b *testing.B) {
|
|
ac := kv.NewAttCaches()
|
|
|
|
att := ðpb.Attestation{}
|
|
|
|
for i := 0; i < b.N; i++ {
|
|
if err := ac.SaveUnaggregatedAttestation(att); err != nil {
|
|
b.Error(err)
|
|
}
|
|
if err := ac.DeleteAggregatedAttestation(att); err != nil {
|
|
b.Error(err)
|
|
}
|
|
}
|
|
}
|