Documentation
¶
Index ¶
Constants ¶
const Version = "1.1"
Version of the speedmap package
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Benchmark ¶
Benchmark runs the workload against multiple stores with multiple clients and then saves the results as a CSV file to disk.
func New ¶
New returns a Benchmark object ready to evaluate Stores. If maxthreads is less than one, sets the maximum number of threads to a default of 10.
type Result ¶
type Result struct {
Store Store // The store that the result is for
Workload Workload // The workload of the result
Concurrency int // The number of concurrent clients executed on the store
Operations uint64 // The number of operations successfully executed
Duration time.Duration // The length of time the workload run took
}
Result holds a record for a run of the workload execution.
func (*Result) String ¶
String returns a CSV value for writing the record to disk: store,workload,concurrency,operations,duration (ns),throughput
func (*Result) Throughput ¶
Throughput returns the number of operations per second achieved.
type Store ¶
type Store interface {
Get(key string) (value []byte, err error)
Put(key string, value []byte) (err error)
Delete(key string) (err error)
GetOrCreate(key string, value []byte) (actual []byte, created bool)
String() string
}
Store represents the interface for all in-memory key/value data structures that are being benchmarked by the Speed Map package.




