settings

package
v0.0.0-...-a068d24 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2017 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var COMBINED_FAIR_RATIO float64 = .25

COMBINED_FAIR_RATIO is used during the combined test the frequency that it will perform any operation, with the same frequency

View Source
var COMBINED_KEY_RANGE int64 = 255

COMBINED_KEY_RANGE is the range of generated 64-bit signed integer keys using during the combined test

View Source
var COMBINED_OPS_PER_GOROUTINE int64 = 1000000

COMBINED_OPS_PER_GOROUTINE is used to determine just how many randomized operations are performed per Goroutine during a combined test.

View Source
var COMBINED_SKIM_NON_ITERATION_RATIO float64 = .325
View Source
var INTSET_FAIR_INSERT_RATIO float64 = .25

INTSET_FAIR_INSERT_RATIO is used during the integer set fair test to determine the ratio lookup operations are done. By default, this value is set to .25 to allow fairness in frequency of writes

View Source
var INTSET_FAIR_LOOKUP_RATIO float64 = .5

INTSET_FAIR_LOOKUP_RATIO is used during the integer set fair test to determine the ratio lookup operations are done. By default, this value is set to .5 to allow fairness in frequency of reads

View Source
var INTSET_FAIR_REMOVE_RATIO float64 = .25

INTSET_FAIR_REMOVE_RATIO is used during the integer set fair test to determine the ratio lookup operations are done. By default, this value is set to .25 to allow fairness in frequency of writes

View Source
var INTSET_OPS_PER_GOROUTINE uint64 = 1000000

INTSET_OPS_PER_GOROUTINE is used to determine just how many randomized operations are performed per Goroutine during an integer set test. By default, this value is 1000000.

View Source
var INTSET_PREEMPTIVE_FILL float64 = .5

INTSET_PREEMPTIVE_FILL is used during the integer set test to initially fill the map to reduce overhead of expansion/resizing. By default, this value is set to .5.

View Source
var INTSET_RNG_SEED int64 = 0x1BAD5EED

INTSET_RNG_SEED is used during the integer set test to randomly generate values. This is consistent during the test to test for correctness. By default, this value is set to 0x1BAD5EED (One Bad Seed) out of hilarity from the developer.

View Source
var INTSET_VALUE_RANGE uint64 = 1000000

INTSET_VALUE_RANGE is used during integer set test to determine the range of the randomly generated values. By default, this value is set to 1000000.

View Source
var INTSET_WRITE_BIAS_INSERT_RATIO float64 = .33

INTSET_WRITE_BIAS_INSERT_RATIO is used during the integer set write-biased test to determine the ratio lookup operations are done. By default, this value is set to .33 to allow more bias in frequency of writes

View Source
var INTSET_WRITE_BIAS_LOOKUP_RATIO float64 = .33

INTSET_WRITE_BIAS_LOOKUP_RATIO is used during the integer set write-biased test to determine the ratio lookup operations are done. By default, this value is set to .33 to allow less bias in frequency of reads

View Source
var INTSET_WRITE_BIAS_REMOVE_RATIO float64 = .33

INTSET_WRITE_BIAS_REMOVE_RATIO is used during the integer set write-biased test to determine the ratio lookup operations are done. By default, this value is set to .33 to allow more bias in frequency of writes

View Source
var ITERATOR_NUM_ELEMS int64 = 10000

ITERATOR_NUM_ELEMS is used to determine, in iterator tests, how many elements are added to the map to be iterated over

View Source
var ITERATOR_NUM_ITERATIONS uint64 = 10000
View Source
var ITERATOR_POOLED_ELEMENTS uint64

ITERATOR_POOLED_ELEMENTS is used to determine, in iterator tests, how many elements should be allocated ahead of time to be used during the test. By default, this is 0, and hence, during benchmarks the overhead of allocation should be factored in

View Source
var ITERATOR_RNG_INCREMENT int64 = 10

ITERATOR_RNG_INCREMENT is used to determine, in iterator tests, the range of the randomized integer used to test for when the element's 'iter' field should be incremented

View Source
var NUM_GOROUTINES int

NUM_GOROUTINES is used to determine the maximum number of Goroutines used during the test. Normally, if none is specified by the user, it is initialized to GOMAXPROCS.

View Source
var SWAP_FREQUENCY float64 = .33

SWAP_FREQUENCY is used to during the sync.Interlocked swap test to determine how often elements are swapped. By default, this value is set to .33

Functions

func ParallelTest

func ParallelTest(nGoroutines int, callback func()) time.Duration

ParallelTest is used to create simple, benchmarked parallel and concurrent tests. The test is comprised of 'nGoroutines' being spawned, and then timing their execution of the 'callback' function passed. This means that the 'callback' function should handle the entirety of the benchmark.

Types

type Unused

type Unused byte

Type used to indicate a particular key and/or value is unused for the sake of the test.

var UNUSED Unused = '0'

Jump to

Keyboard shortcuts

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