profiles

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2015 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OP_POINT_SELECTS       = iota
	OP_POINT_SELECTS_AGG   = iota
	OP_SIMPLE_RANGES       = iota
	OP_SIMPLE_RANGES_AGG   = iota
	OP_SUM_RANGES          = iota
	OP_ORDER_RANGES        = iota
	OP_ORDER_RANGES_AGG    = iota
	OP_DISTINCT_RANGES     = iota
	OP_DISTINCT_RANGES_AGG = iota
	OP_INDEX_UPDATES       = iota
	OP_NON_INDEX_UPDATES   = iota
	OP_REMOVE_AND_INSERT   = iota
	OP_UPDATE_PUSH_FIRST   = iota
	OP_UPDATE_PUSH_LAST    = iota

	OP_INSERT_16M_DOC    = iota
	OP_WRITE_BULK_INSERT = iota
	OP_RANGE_QUERY       = iota

	OP_MAX_OPS = iota
)
View Source
const (
	SYSBENCH_POINT_SELECTS       = iota
	SYSBENCH_POINT_SELECTS_AGG   = iota
	SYSBENCH_SIMPLE_RANGES       = iota
	SYSBENCH_SIMPLE_RANGES_AGG   = iota
	SYSBENCH_SUM_RANGES          = iota
	SYSBENCH_ORDER_RANGES        = iota
	SYSBENCH_ORDER_RANGES_AGG    = iota
	SYSBENCH_DISTINCT_RANGES     = iota
	SYSBENCH_DISTINCT_RANGES_AGG = iota
	SYSBENCH_INDEX_UPDATES       = iota
	SYSBENCH_NON_INDEX_UPDATES   = iota
	SYSBENCH_REMOVE_AND_INSERT   = iota
	SYSBENCH_UPDATE_PUSH_FIRST   = iota
	SYSBENCH_UPDATE_PUSH_LAST    = iota

	SYSBENCH_MAX_OPS = iota
)

Variables

View Source
var BulkPayload [2048]byte
View Source
var HT_BATCH_SIZE int

some OS env

View Source
var HT_INSERT_WITH_ID int
View Source
var OP_Ops [OP_MAX_OPS]operation
View Source
var Payload [40]int
View Source
var Payload1 [120]byte
View Source
var Payload2 [120]byte
View Source
var Payload3 [120]byte
View Source
var Payload4 [120]byte
View Source
var Payload5 [120]byte
View Source
var Payload6 [120]byte
View Source
var Run_TOKU_Test bool
View Source
var SB_Ops [SYSBENCH_MAX_OPS]operation

Functions

func CallFinalFunc added in v0.1.2

func CallFinalFunc(c *mgo.Session)

func GetCurrentProfileCSV

func GetCurrentProfileCSV(total_time float64) string

func GetProfileCSVHeader

func GetProfileCSVHeader() string

func InitProfile added in v0.1.4

func InitProfile(_num_of_workers int)

func InitSimpleTest

func InitSimpleTest(session *mgo.Session, _initdb bool)

Types

type AdHocPerson

type AdHocPerson struct {
	Name     int64
	UID      bson.ObjectId `bson:"_id,omitempty"`
	Group    int
	Payload  [40]int
	Payload1 [120]byte
	Payload2 [120]byte
	Payload3 [120]byte
	Payload4 [120]byte
	Payload5 [120]byte
	Payload6 [120]byte
}

type AggSmallDoc

type AggSmallDoc struct {
	Name          int64
	UID           bson.ObjectId `bson:"_id,omitempty"`
	RandUnindexed int
	Rem100        int
	RandIndexed   int
	Array         [10]int
}

type Event

type Event struct {
	ID        bson.ObjectId `bson:"_id,omitempty"`
	Tags      []string      // between 1 and 20 <tagValues> per document
	Stream    string
	Position  int
	Payload   string // 0 - 16kb, peak 500 bytes
	Timestamp time.Time
}

type Person

type Person struct {
	Name    int64
	UID     bson.ObjectId `bson:"_id,omitempty"`
	Group   int
	Payload string
}

type Profile

type Profile interface {
	// Next()                      // return next call information  ??Need this??
	SendNext(c *mgo.Session, worker_id int) error // prepare and send the next call
	SetupTest(s *mgo.Session, _initdb bool) error
	CsvString(total_time float64) string
	CsvHeader() string
}

Profile is the interface to define Profiles.

func GetProfile

func GetProfile(s string) Profile

type ProfileFinalFunc added in v0.1.2

type ProfileFinalFunc interface {
	Final(c *mgo.Session) // will be run before program exit, used for correctness check
}

type ProfilePointer

type ProfilePointer *Profile

type ProfileStats

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

func (*ProfileStats) GetAvg

func (p *ProfileStats) GetAvg(total_time float64) float64

func (*ProfileStats) GetLastIntervalReq

func (p *ProfileStats) GetLastIntervalReq() int64

func (*ProfileStats) GetThroughput

func (p *ProfileStats) GetThroughput(total_time float64) float64

func (*ProfileStats) RecordResponse

func (p *ProfileStats) RecordResponse(t int64)

type QA408Config

type QA408Config struct {
	Profile struct {
		Staging          int // number of record to be insert at the beginning of the run
		QueryLimit       int
		FindByStreamName float64
		FindByTag        float64
		FindByDateRange  float64
		UpdateTag        float64
		UpdatePayload    float64
		AddDoc           float64
		FindByPayload    float64
		BatchSize        int
	}
}

type QA408Distribution

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

type QA492Config

type QA492Config struct {
	Profile struct {
		Staging          int // number of record to be insert at the beginning of the run
		QueryLimit       int
		BatchSize        int
		UIDRange         int
		DateRange        int
		FindByStreamName float64
		FindByTag        float64
		FindByDateRange  float64
		UpdateTag        float64
		UpdatePayload    float64
		AddDoc           float64
		FindByPayload    float64

		// qa492 new
		FindByStreamAndUser    float64
		FindByTagAndUser       float64
		FindByDateEangeAndUser float64

		FindByStreamAndUserHint    bool
		FindByTagAndUserHint       bool
		FindByDateEangeAndUserHint bool

		NumOfStreams int64
		NumOfTags    int64

		Distribution      string
		NormalStdDevRatio float64
	}
}

type QA492Distribution

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

type QA492_Event

type QA492_Event struct {
	ID        bson.ObjectId `bson:"_id,omitempty"`
	User      int64         `bson:"user"` // user name, could be duplicate
	Tags      []string      `bson:"tags"` // between 1 and 20 <tagValues> per document
	Stream    string        `bson:"stream"`
	Position  int           `bson:"position"`
	Payload   string        `bson:"payload"` // 0 - 16kb, peak 500 bytes
	Timestamp time.Time     `bson:"timestamp"`
}

type RandomDataMaker added in v0.1.7

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

func (*RandomDataMaker) Read added in v0.1.7

func (r *RandomDataMaker) Read(p []byte) (n int, err error)

type SmallDoc

type SmallDoc struct {
	Name    int64
	UID     bson.ObjectId `bson:"_id,omitempty"`
	Group   int
	Payload [25]int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL