Documentation
¶
Overview ¶
Package benchmark provides internally used benchmark support
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var OutputMSAB int32 = 0
View Source
var Rec int32
Functions ¶
This section is empty.
Types ¶
type FPRResult ¶ added in v0.5.1
type FPRResult struct {
KeyCount int `tw-title:"key-count"`
FPR float64 `tw-title:"fpr" tw-fmt:"%.3f%%"`
}
FPRResult represent the false positive rate.
type GetResult ¶ added in v0.3.1
type GetResult struct {
KeyCount int `tw-title:"key-count"`
K64 int `tw-title:"k=64"`
K128 int `tw-title:"k=128"`
K256 int `tw-title:"k=256"`
}
GetResult represent the ns/Get() for virous key count and several predefined key length = 64, 128, 256
func GetPresent ¶ added in v0.3.1
GetPresent benchmark the Get() of present key.
type GetSetting ¶ added in v0.3.1
type GetSetting struct {
Keys []string
Values []int32
AbsentKeys []string
SlimKV *slimKV
Map map[string]int32
Btree *btree.BTree
SearchKey string
SearchValue int32
}
GetSetting defines benchmark data source.
func NewGetSetting ¶ added in v0.3.1
func NewGetSetting(cnt int, keyLen int) *GetSetting
type KVElt ¶ added in v0.5.10
KVElt defines a key-value struct to be used as a value in SlimTrie in test.
type MSABResult ¶ added in v0.5.10
type MSABResult struct {
KeyCount int `tw-title:"key-count"`
Map int `tw-title:"map"`
Slim int `tw-title:"SlimTrie"`
Array int `tw-title:"array"`
Btree int `tw-title:"Btree"`
}
MSABResult defines the ns/Get() for Map, SlimTrie, Array and Btree.
func GetMapSlimArrayBtree ¶ added in v0.5.10
func GetMapSlimArrayBtree(keyCounts []int) []MSABResult
type SearchResult ¶
type SearchResult struct {
KeyCnt int
KeyLen int
ExsitingKeyNsPerOp int64
NonexsitentKeyNsPerOp int64
}
SearchResult show the key search result with a constructed data. Used to transfer benchmark result currently. SearchResult also defines the column titles when output to a chart.
Click to show internal directories.
Click to hide internal directories.