cockroach: github.com/cockroachdb/cockroach/pkg/workload/ycsb Index | Files

package ycsb

import "github.com/cockroachdb/cockroach/pkg/workload/ycsb"

Package ycsb is the workload specified by the Yahoo! Cloud Serving Benchmark.

Index

Package Files

acknowledged_counter.go skewed_latest_generator.go uniform_generator.go ycsb.go zipfgenerator.go

type AcknowledgedCounter Uses

type AcknowledgedCounter struct {
    // contains filtered or unexported fields
}

AcknowledgedCounter keeps track of the largest value v such that all values in [initialCount, v) are acknowledged.

func NewAcknowledgedCounter Uses

func NewAcknowledgedCounter(initialCount uint64) *AcknowledgedCounter

NewAcknowledgedCounter constructs a new AcknowledgedCounter with the given parameters.

func (*AcknowledgedCounter) Acknowledge Uses

func (c *AcknowledgedCounter) Acknowledge(v uint64) (uint64, error)

Acknowledge marks v as being acknowledged.

func (*AcknowledgedCounter) Last Uses

func (c *AcknowledgedCounter) Last() uint64

Last returns the largest value v such that all values in [initialCount, v) are ackowledged.

type SkewedLatestGenerator Uses

type SkewedLatestGenerator struct {
    // contains filtered or unexported fields
}

SkewedLatestGenerator is a random number generator that generates numbers in the range [iMin, iMax], but skews it towards iMax using a zipfian distribution.

func NewSkewedLatestGenerator Uses

func NewSkewedLatestGenerator(
    rng *rand.Rand, iMin, iMax uint64, theta float64, verbose bool,
) (*SkewedLatestGenerator, error)

NewSkewedLatestGenerator constructs a new SkewedLatestGenerator with the given parameters. It returns an error if the parameters are outside the accepted range.

func (*SkewedLatestGenerator) IncrementIMax Uses

func (z *SkewedLatestGenerator) IncrementIMax(count uint64) error

IncrementIMax increments iMax by count.

func (*SkewedLatestGenerator) Uint64 Uses

func (z *SkewedLatestGenerator) Uint64() uint64

Uint64 returns a random Uint64 between iMin and iMax, where keys near iMax are most likely to be drawn.

type UniformGenerator Uses

type UniformGenerator struct {
    // contains filtered or unexported fields
}

UniformGenerator is a random number generator that generates draws from a uniform distribution.

func NewUniformGenerator Uses

func NewUniformGenerator(rng *rand.Rand, iMin, iMax uint64) (*UniformGenerator, error)

NewUniformGenerator constructs a new UniformGenerator with the given parameters. It returns an error if the parameters are outside the accepted range.

func (*UniformGenerator) IncrementIMax Uses

func (z *UniformGenerator) IncrementIMax(count uint64) error

IncrementIMax increments iMax by count.

func (*UniformGenerator) Uint64 Uses

func (z *UniformGenerator) Uint64() uint64

Uint64 returns a random Uint64 between iMin and iMax, drawn from a uniform distribution.

type ZipfGenerator Uses

type ZipfGenerator struct {
    // contains filtered or unexported fields
}

ZipfGenerator is a random number generator that generates draws from a Zipf distribution. Unlike rand.Zipf, this generator supports incrementing the imax parameter without performing an expensive recomputation of the underlying hidden parameters, which is a pattern used in [1] for efficiently generating large volumes of Zipf-distributed records for synthetic data. Second, rand.Zipf only supports theta <= 1, we suppose all values of theta.

func NewZipfGenerator Uses

func NewZipfGenerator(
    rng *rand.Rand, iMin, iMax uint64, theta float64, verbose bool,
) (*ZipfGenerator, error)

NewZipfGenerator constructs a new ZipfGenerator with the given parameters. It returns an error if the parameters are outside the accepted range.

func (*ZipfGenerator) IncrementIMax Uses

func (z *ZipfGenerator) IncrementIMax(count uint64) error

IncrementIMax increments iMax by count and recomputes the internal values that depend on it. It throws an error if the recomputation failed.

func (*ZipfGenerator) Uint64 Uses

func (z *ZipfGenerator) Uint64() uint64

Uint64 draws a new value between iMin and iMax, with probabilities according to the Zipf distribution.

type ZipfGeneratorMu Uses

type ZipfGeneratorMu struct {
    // contains filtered or unexported fields
}

ZipfGeneratorMu holds variables which must be globally synced.

Package ycsb imports 18 packages (graph) and is imported by 4 packages. Updated 2019-08-20. Refresh now. Tools for package owners.