Versions in this module Expand all Collapse all v1 v1.9.0 Oct 3, 2022 Changes in this version + const CapacityReductionFactor + const MaxExcessCapacityFactor + var BenchmarkSizes = [][]int + var Benchmarks = []func(b *testing.B, db Database, name string, keys, values [][]byte) + var ErrClosed = errors.New("closed") + var ErrNotFound = errors.New("not found") + var Tests = []func(t *testing.T, db Database) + func BenchmarkBatchDelete(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkBatchPut(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkBatchWrite(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkDelete(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkGet(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkParallelDelete(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkParallelGet(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkParallelPut(b *testing.B, db Database, name string, keys, values [][]byte) + func BenchmarkPut(b *testing.B, db Database, name string, keys, values [][]byte) + func Clear(readerDB Iteratee, deleterDB KeyValueDeleter) error + func ClearPrefix(readerDB Iteratee, deleterDB KeyValueDeleter, prefix []byte) error + func Count(db Iteratee) (int, error) + func GetBool(db KeyValueReader, key []byte) (bool, error) + func GetID(db KeyValueReader, key []byte) (ids.ID, error) + func GetTimestamp(db KeyValueReader, key []byte) (time.Time, error) + func GetUInt32(db KeyValueReader, key []byte) (uint32, error) + func GetUInt64(db KeyValueReader, key []byte) (uint64, error) + func IsEmpty(db Iteratee) (bool, error) + func PackUInt32(val uint32) []byte + func PackUInt64(val uint64) []byte + func ParseID(b []byte) (ids.ID, error) + func ParseTimestamp(b []byte) (time.Time, error) + func ParseUInt32(b []byte) (uint32, error) + func ParseUInt64(b []byte) (uint64, error) + func PutBool(db KeyValueWriter, key []byte, b bool) error + func PutID(db KeyValueWriter, key []byte, val ids.ID) error + func PutTimestamp(db KeyValueWriter, key []byte, val time.Time) error + func PutUInt32(db KeyValueWriter, key []byte, val uint32) error + func PutUInt64(db KeyValueWriter, key []byte, val uint64) error + func SetupBenchmark(b *testing.B, count int, keySize, valueSize int) ([][]byte, [][]byte) + func Size(db Iteratee) (int, error) + func TestBatchDelete(t *testing.T, db Database) + func TestBatchInner(t *testing.T, db Database) + func TestBatchLargeSize(t *testing.T, db Database) + func TestBatchPut(t *testing.T, db Database) + func TestBatchReplay(t *testing.T, db Database) + func TestBatchReset(t *testing.T, db Database) + func TestBatchReuse(t *testing.T, db Database) + func TestBatchRewrite(t *testing.T, db Database) + func TestClear(t *testing.T, db Database) + func TestClearPrefix(t *testing.T, db Database) + func TestCompactNoPanic(t *testing.T, db Database) + func TestConcurrentBatches(t *testing.T, db Database) + func TestIterator(t *testing.T, db Database) + func TestIteratorClosed(t *testing.T, db Database) + func TestIteratorError(t *testing.T, db Database) + func TestIteratorErrorAfterRelease(t *testing.T, db Database) + func TestIteratorMemorySafety(t *testing.T, db Database) + func TestIteratorPrefix(t *testing.T, db Database) + func TestIteratorSnapshot(t *testing.T, db Database) + func TestIteratorStart(t *testing.T, db Database) + func TestIteratorStartPrefix(t *testing.T, db Database) + func TestKeyEmptyValue(t *testing.T, db Database) + func TestManySmallConcurrentKVPairBatches(t *testing.T, db Database) + func TestMemorySafetyBatch(t *testing.T, db Database) + func TestMemorySafetyDatabase(t *testing.T, db Database) + func TestModifyValueAfterBatchPut(t *testing.T, db Database) + func TestModifyValueAfterBatchPutReplay(t *testing.T, db Database) + func TestModifyValueAfterPut(t *testing.T, db Database) + func TestSimpleKeyValue(t *testing.T, db Database) + func TestSimpleKeyValueClosed(t *testing.T, db Database) + type Batch interface + Inner func() Batch + Replay func(w KeyValueWriterDeleter) error + Reset func() + Size func() int + Write func() error + type Batcher interface + NewBatch func() Batch + type Compacter interface + Compact func(start []byte, limit []byte) error + type Database interface + type Iteratee interface + NewIterator func() Iterator + NewIteratorWithPrefix func(prefix []byte) Iterator + NewIteratorWithStart func(start []byte) Iterator + NewIteratorWithStartAndPrefix func(start, prefix []byte) Iterator + type Iterator interface + Error func() error + Key func() []byte + Next func() bool + Release func() + Value func() []byte + type KeyValueDeleter interface + Delete func(key []byte) error + type KeyValueReader interface + Get func(key []byte) ([]byte, error) + Has func(key []byte) (bool, error) + type KeyValueReaderWriter interface + type KeyValueReaderWriterDeleter interface + type KeyValueWriter interface + Put func(key []byte, value []byte) error + type KeyValueWriterDeleter interface + type MockBatch struct + func NewMockBatch(ctrl *gomock.Controller) *MockBatch + func (m *MockBatch) Delete(arg0 []byte) error + func (m *MockBatch) EXPECT() *MockBatchMockRecorder + func (m *MockBatch) Inner() Batch + func (m *MockBatch) Put(arg0, arg1 []byte) error + func (m *MockBatch) Replay(arg0 KeyValueWriterDeleter) error + func (m *MockBatch) Reset() + func (m *MockBatch) Size() int + func (m *MockBatch) Write() error + type MockBatchMockRecorder struct + func (mr *MockBatchMockRecorder) Delete(arg0 interface{}) *gomock.Call + func (mr *MockBatchMockRecorder) Inner() *gomock.Call + func (mr *MockBatchMockRecorder) Put(arg0, arg1 interface{}) *gomock.Call + func (mr *MockBatchMockRecorder) Replay(arg0 interface{}) *gomock.Call + func (mr *MockBatchMockRecorder) Reset() *gomock.Call + func (mr *MockBatchMockRecorder) Size() *gomock.Call + func (mr *MockBatchMockRecorder) Write() *gomock.Call