Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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
var COMBINED_KEY_RANGE int64 = 255
COMBINED_KEY_RANGE is the range of generated 64-bit signed integer keys using during the combined test
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.
var COMBINED_SKIM_NON_ITERATION_RATIO float64 = .325
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
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
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
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.
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.
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.
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.
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
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
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
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
var ITERATOR_NUM_ITERATIONS uint64 = 10000
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
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
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.
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 ¶
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.