Documentation ¶
Index ¶
- Constants
- Variables
- func Hash(inString string) string
- func RandString(key string, expectedLength int) string
- type Config
- type Default
- func (w *Default) DoBatch(db databases.Database, state *State, seq chan string)
- func (w *Default) GenerateExistingKey(currentRecords int64) string
- func (w *Default) GenerateKeyForRemoval() string
- func (w *Default) GenerateNewKey(currentRecords int64) string
- func (w *Default) GenerateQueryArgs(key string) []interface{}
- func (w *Default) GenerateValue(key string, size int) map[string]interface{}
- func (w *Default) PrepareBatch() []string
- func (w *Default) PrepareQuerySeq(size int64) chan string
- func (w *Default) PrepareSeq(size int64) chan string
- func (w *Default) RunCRUDWorkload(database databases.Database, state *State, wg *sync.WaitGroup)
- func (w *Default) RunQueryWorkload(database databases.Database, state *State, wg *sync.WaitGroup)
- func (w *Default) SetImplementation(i Workload)
- type HotSpot
- type N1QL
- func (w *N1QL) GenerateExistingKey(currentRecords int64) string
- func (w *N1QL) GenerateKeyForRemoval() string
- func (w *N1QL) GenerateNewKey(currentRecords int64) string
- func (w *N1QL) GenerateQueryArgs(key string) []interface{}
- func (w *N1QL) GenerateValue(key string, size int) map[string]interface{}
- func (w *N1QL) RandSize(size int) int
- type State
- type Workload
Constants ¶
View Source
const BatchSize int = 100
Variables ¶
View Source
var NUM_STATES = len(STATES)
View Source
var OVERHEAD = int(450)
View Source
var STATES = [][]string{ []string{"AK", "Alaska"}, []string{"AL", "Alabama"}, []string{"AR", "Arkansas"}, []string{"AS", "American Samoa"}, []string{"AZ", "Arizona"}, []string{"CA", "California"}, []string{"CO", "Colorado"}, []string{"CT", "Connecticut"}, []string{"DC", "District of Columbia"}, []string{"DE", "Delaware"}, []string{"FL", "Florida"}, []string{"GA", "Georgia"}, []string{"GU", "Guam"}, []string{"HI", "Hawaii"}, []string{"IA", "Iowa"}, []string{"ID", "Idaho"}, []string{"IL", "Illinois"}, []string{"IN", "Indiana"}, []string{"KS", "Kansas"}, []string{"KY", "Kentucky"}, []string{"LA", "Louisiana"}, []string{"MA", "Massachusetts"}, []string{"MD", "Maryland"}, []string{"ME", "Maine"}, []string{"MI", "Michigan"}, []string{"MN", "Minnesota"}, []string{"MO", "Missouri"}, []string{"MP", "Northern Mariana Islands"}, []string{"MS", "Mississippi"}, []string{"MT", "Montana"}, []string{"NA", "National"}, []string{"NC", "North Carolina"}, []string{"ND", "North Dakota"}, []string{"NE", "Nebraska"}, []string{"NH", "New Hampshire"}, []string{"NJ", "New Jersey"}, []string{"NM", "New Mexico"}, []string{"NV", "Nevada"}, []string{"NY", "New York"}, []string{"OH", "Ohio"}, []string{"OK", "Oklahoma"}, []string{"OR", "Oregon"}, []string{"PA", "Pennsylvania"}, []string{"PR", "Puerto Rico"}, []string{"RI", "Rhode Island"}, []string{"SC", "South Carolina"}, []string{"SD", "South Dakota"}, []string{"TN", "Tennessee"}, []string{"TX", "Texas"}, []string{"UT", "Utah"}, []string{"VA", "Virginia"}, []string{"VI", "Virgin Islands"}, []string{"VT", "Vermont"}, []string{"WA", "Washington"}, []string{"WI", "Wisconsin"}, []string{"WV", "West Virginia"}, []string{"WY", "Wyoming"}, }
Functions ¶
func RandString ¶
Types ¶
type Config ¶
type Config struct { Type string CreatePercentage int ReadPercentage int UpdatePercentage int DeletePercentage int Records int64 Operations int64 ValueSize int Workers int QueryWorkers int Throughput int QueryThroughput int HotDataPercentage int64 HotSpotAccessPercentage int RunTime int Indexes []string }
type Default ¶
func (*Default) GenerateExistingKey ¶
func (*Default) GenerateKeyForRemoval ¶
func (*Default) GenerateNewKey ¶
func (*Default) GenerateQueryArgs ¶
func (*Default) GenerateValue ¶
func (*Default) PrepareBatch ¶
func (*Default) PrepareQuerySeq ¶
func (*Default) PrepareSeq ¶
func (*Default) RunCRUDWorkload ¶
func (*Default) RunQueryWorkload ¶
func (*Default) SetImplementation ¶
type HotSpot ¶
func (*HotSpot) GenerateExistingKey ¶
type N1QL ¶
func (*N1QL) GenerateExistingKey ¶
func (*N1QL) GenerateKeyForRemoval ¶
func (*N1QL) GenerateNewKey ¶
func (*N1QL) GenerateQueryArgs ¶
func (*N1QL) GenerateValue ¶
type State ¶
type State struct {
Operations, Records int64
Errors map[string]int
Events map[string]time.Time
Latency map[string][]float64
}
func (*State) MeasureLatency ¶
func (*State) ReportSummary ¶
func (state *State) ReportSummary()
type Workload ¶
type Workload interface { SetImplementation(i Workload) GenerateNewKey(currentRecords int64) string GenerateExistingKey(currentRecords int64) string GenerateKeyForRemoval() string GenerateValue(key string, size int) map[string]interface{} GenerateQueryArgs(key string) []interface{} PrepareBatch() []string PrepareSeq(size int64) chan string DoBatch(database databases.Database, state *State, seq chan string) RunCRUDWorkload(database databases.Database, state *State, wg *sync.WaitGroup) RunQueryWorkload(database databases.Database, state *State, wg *sync.WaitGroup) }
Click to show internal directories.
Click to hide internal directories.