Documentation ¶
Overview ¶
Package bench contains benchmarking utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StoreConfig ¶
type StoreConfig struct { NumKeys int // The number of keys to sample from. ValueSize Size // The size of values written to keys. ReadFraction float32 // The fraction of operations that are reads. Duration time.Duration // The duration of the benchmark. Logger *logging.FuncLogger // A logger. Parallelism int // The number of parallel store operations. }
StoreConfig configures the benchmark run by BenchStore.
type StoreStats ¶
type StoreStats struct { Throughput float64 // Number of ops/second (reads and writes). MeanReadLatency time.Duration // Mean read latency. MeanWriteLatency time.Duration // Mean write latency. }
StoreStats contains statistics about a store benchmark.
func BenchStore ¶
func BenchStore(ctx context.Context, store store.Store, config StoreConfig) (StoreStats, error)
BenchStore benchmarks the provided store by repeatedly performing reads and writes against a set of keys sampled uniformly at random.
Click to show internal directories.
Click to hide internal directories.