pirtest

package
Version: v0.0.0-...-6f805fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2020 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

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

func GenerateData(size int) []byte

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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL