Documentation
¶
Index ¶
Constants ¶
const ( // MaxKeys being accessed by all threads MaxKeys = 5000 // OpsPerThread being executed against the store OpsPerThread = 5000 // DataSize is the number of bytes written to each key DataSize = 32 )
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomBytes ¶
GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func RandomKey ¶
RandomKey returns a random key in the specified key range. For example if the keylen is 100, then range 0 is 0-99, range 1 is 100-199, etc. This function is used to generate random keys where keys in Range 0 are conflicting and keys in another range are not.
func RandomMutation ¶
RandomMutation modifies the byte array by replacing bytes with random bytes this method should be much quicker at modifying an existing random array than generating an entirely new random array of equal size.
Types ¶
type Conflict ¶
type Conflict struct {
// contains filtered or unexported fields
}
Conflict allocates a key range to each thread, along with a probability that the thread will access a key being accessed by a different thread. A 0% probability means that the clients will access a disjoint key set.
func NewConflict ¶
NewConflict workload with the specified probability.