keyvalue

package
v0.0.67 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0, NCSA Imports: 4 Imported by: 0

Documentation

Overview

Package keyvalue contains utilities to test keyvalue DB implementations.

Index

Constants

This section is empty.

Variables

View Source
var NewGraphStore = keyvalue.NewGraphStore

NewGraphStore re-exports keyvalue.NewGraphStore for tests

Functions

func BatchWriteBenchmark

func BatchWriteBenchmark(b *testing.B, create CreateFunc, batchSize int)

BatchWriteBenchmark benchmarks the Write method of the given keyvalue.DB. The number of updates per write is configured with batchSize.

func BatchWriteParallelBenchmark

func BatchWriteParallelBenchmark(b *testing.B, create CreateFunc, batchSize int)

BatchWriteParallelBenchmark benchmarks the Write method of the given keyvalue.DB in parallel. The number of updates per write is configured with batchSize.

func NullDestroy

func NullDestroy() error

NullDestroy does nothing.

Types

type CreateFunc

type CreateFunc func() (DB, DestroyFunc, error)

CreateFunc creates a temporary keyvalue.DB with a corresponding function to destroy it completely.

type DB

type DB keyvalue.DB

DB re-exports keyvalue.DB for tests

type DestroyFunc

type DestroyFunc func() error

DestroyFunc destroys its corresponding keyvalue.DB returned from a CreateFunc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL