tests

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchPut

func BenchPut(b *testing.B, store storage.WritableStorage, gen Gen, scale int)

Types

type Gen

type Gen func() (key string, content []byte)

Gen is a func which should generate key-value pairs. It's used to configure benchmarks.

How exactly to use this is up to you, but a good gen function should probably return a wide variety of keys, and some known distribution of key and content sizes. If it returns the same key frequently, it should be documented, because key collision rates will affect benchmark results.

func NewCounterGen

func NewCounterGen(start int64) Gen

NewCounterGen returns a Gen func which yields a unique value on each subsequent call, which is simply the base-10 string representation of an incrementing integer. The content and the key are the same.

Jump to

Keyboard shortcuts

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