Something went wrong. Try again.
An ATProto Powered Reputation Network
Something went wrong. Try again.
557 B · 22 lines
Go
at master
1234567891011121314151617181920212223package trust
import ( "fmt" "provenance/internal/domain" "testing")
func BenchmarkSelectScale(b *testing.B) { const count = 100000 edges := make([]domain.Vouch, count) for index := range edges { edges[index] = domain.Vouch{Author: fmt.Sprintf("did:plc:%024d", index), Subject: "did:plc:target", Source: domain.FollowCollection, RecordKey: fmt.Sprint(index), Score: .5} } b.ReportAllocs() b.ResetTimer() for index := 0; index < b.N; index++ { if len(Select(edges, "", domain.Default)) != count { b.Fatal("selection lost edges") } }}