benchmark

package
v0.0.0-...-ba1c585 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Overwrite

func Overwrite(b *testing.B, config *Config)

Overwrite overwrites b.N values in random key order.

func ReadRandom

func ReadRandom(b *testing.B, config *Config)

ReadRandom reads b.N values in random key order.

func ReadSequential

func ReadSequential(b *testing.B, config *Config)

ReadSequential reads b.N values in sequential key order.

func WriteRandom

func WriteRandom(b *testing.B, config *Config)

WriteRandom writes b.N values in random key order.

func WriteSequential

func WriteSequential(b *testing.B, config *Config)

WriteSequential writes b.N values in sequential key order.

Types

type Config

type Config struct {
	Rand *RandomGenerator
	// St is the database to use. Initially it should be empty.
	St       store.Store
	KeyLen   int // size of each key
	ValueLen int // size of each value
}

Config is a set of settings required to run a benchmark.

type RandomGenerator

type RandomGenerator struct {
	rand.Rand
	// contains filtered or unexported fields
}

RandomGenerator is a helper for generating random data.

func NewRandomGenerator

func NewRandomGenerator(seed int64, compressionRatio float64) *RandomGenerator

NewRandomGenerator returns a new generator of pseudo-random byte sequences seeded with the given value. Every N bytes produced by this generator can be compressed to (compressionRatio * N) bytes.

Jump to

Keyboard shortcuts

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