workload

package
v1.0.0-alpha.13 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serialize

func Serialize(doc *Document) ([]byte, error)

Types

type DDLWorkload

type DDLWorkload struct {
	Threads     int16
	Database    string
	Collections []string
	Schemas     [][]byte
}

func (*DDLWorkload) Check

func (w *DDLWorkload) Check(client driver.Driver) (bool, error)

func (*DDLWorkload) Setup

func (w *DDLWorkload) Setup(client driver.Driver) error

func (*DDLWorkload) Start

func (w *DDLWorkload) Start(client driver.Driver) error

func (*DDLWorkload) Type

func (w *DDLWorkload) Type() string

type Document

type Document struct {
	F1 int64
	F2 string
	F3 []byte
	F4 uuid.UUID
	F5 time.Time
}

func Deserialize

func Deserialize(raw []byte) (*Document, error)

func NewDocument

func NewDocument(uniqueId int64) *Document

type InsertOnlyWorkload

type InsertOnlyWorkload struct {
	Threads      int16
	Records      int64
	Database     string
	Collections  []string
	Schemas      [][]byte
	WorkloadData *Queue
}

func (*InsertOnlyWorkload) Check

func (w *InsertOnlyWorkload) Check(client driver.Driver) (bool, error)

func (*InsertOnlyWorkload) Setup

func (w *InsertOnlyWorkload) Setup(client driver.Driver) error

func (*InsertOnlyWorkload) Start

func (w *InsertOnlyWorkload) Start(client driver.Driver) error

func (*InsertOnlyWorkload) Type

func (w *InsertOnlyWorkload) Type() string

type Queue

type Queue struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue(collections []string) *Queue

func (*Queue) Get

func (q *Queue) Get(collectionName string) *QueueDocuments

func (*Queue) Insert

func (q *Queue) Insert(collectionName string, doc *Document)

type QueueDocuments

type QueueDocuments struct {
	sync.Mutex

	Collection string
	Documents  []*Document
}

func NewQueueDocuments

func NewQueueDocuments(collection string) *QueueDocuments

func (*QueueDocuments) Insert

func (q *QueueDocuments) Insert(doc *Document)

Jump to

Keyboard shortcuts

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