Documentation
¶
Index ¶
- Constants
- func AfterEach(f FatalInterface, shard pirinterface.Shard, context pirinterface.Context)
- func GenerateData(size int) []byte
- func HelperBenchmarkShardRead(b *testing.B, shard pirinterface.Shard, batchSize int)
- func HelperTestClientRead(t *testing.T, shard pirinterface.Shard)
- func HelperTestShardRead(t *testing.T, shard pirinterface.Shard)
- type FatalInterface
Constants ¶
View Source
const ( // TestBatchSize is the batch size used in tests TestBatchSize = 3 // TestNumMessages is the number of messages on the database used in tests TestNumMessages = 32 // TestMessageSize is the message size used in tests TestMessageSize = 8 // TestDepth is the bucket depth used in tests TestDepth = 2 // 16 buckets // BenchBatchSize is the batch size used in benchmarks BenchBatchSize = 128 // This seems to provide the best GPU perf // BenchNumMessages is the number of messages on the database used in benchmarks BenchNumMessages = 1048576 // 2^20 // BenchMessageSize is the message size used in benchmarks BenchMessageSize = 1024 // BenchDepth is the bucket depth used in benchmarks BenchDepth = 4 // 262144=2^18 buckets )
Variables ¶
This section is empty.
Functions ¶
func AfterEach ¶
func AfterEach(f FatalInterface, shard pirinterface.Shard, context pirinterface.Context)
AfterEach frees up the shard and context used in a test
func GenerateData ¶
GenerateData will generate a byte array for tests
func HelperBenchmarkShardRead ¶
func HelperBenchmarkShardRead(b *testing.B, shard pirinterface.Shard, batchSize int)
HelperBenchmarkShardRead is the generic function for testing performance of a PIR implementation
func HelperTestClientRead ¶
func HelperTestClientRead(t *testing.T, shard pirinterface.Shard)
HelperTestClientRead tests an end to end PIR read
func HelperTestShardRead ¶
func HelperTestShardRead(t *testing.T, shard pirinterface.Shard)
HelperTestShardRead is the generic function for testing correctness of a PIR implementation
Types ¶
type FatalInterface ¶
type FatalInterface interface { Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) }
FatalInterface is a abstracts out calls to Fatal and Fatalf