Documentation ¶
Index ¶
- func Deserialize(raw []byte, doc any) error
- func Serialize(doc *Document) ([]byte, error)
- func SerializeDocV1(doc *DocumentV1) ([]byte, error)
- type Address
- type BigPayloadWorkload
- type DDLWorkload
- type Document
- type DocumentV1
- type DropCreateWriteWorkload
- type IDocument
- type InsertOnlyWorkload
- type Nested
- type Queue
- type QueueDocuments
- type ReplaceOnlyWorkload
- type SearchOnlyWorkload
- type SmallConciseWorkload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
func SerializeDocV1 ¶
func SerializeDocV1(doc *DocumentV1) ([]byte, error)
Types ¶
type BigPayloadWorkload ¶
type BigPayloadWorkload struct { Threads int16 Records int64 Database string Collections string Schemas []byte WorkloadData *Queue IsBatch bool }
func (*BigPayloadWorkload) Check ¶
func (w *BigPayloadWorkload) Check(client driver.Driver) (bool, error)
func (*BigPayloadWorkload) Start ¶
func (w *BigPayloadWorkload) Start(client driver.Driver) (int64, error)
func (*BigPayloadWorkload) Type ¶
func (*BigPayloadWorkload) Type() string
type DDLWorkload ¶
func (*DDLWorkload) Type ¶
func (*DDLWorkload) Type() string
type Document ¶
type Document struct { Id int64 `json:"id"` F2 string `json:"F2" fake:"{sentence:50}"` F3 []byte F4 uuid.UUID F5 time.Time }
func NewDocument ¶
type DocumentV1 ¶
type DocumentV1 struct { Id int64 `json:"id"` Cars []string `json:"cars" fake:"{carmaker}" fakesize:"20000"` Food []string `json:"food" fake:"{food}" fakesize:"20000"` CreatedAt time.Time `json:"created_at" fake:"{date}"` UpdatedAt time.Time `json:"updated_at" fake:"{date}"` Nested *Nested `json:"nested"` }
func NewDocumentV1 ¶
func NewDocumentV1(id int64) *DocumentV1
func (*DocumentV1) ID ¶
func (d *DocumentV1) ID() int64
type DropCreateWriteWorkload ¶
type DropCreateWriteWorkload struct { Threads int16 Database string Collections []string Schemas [][]byte Records int64 }
func (*DropCreateWriteWorkload) Check ¶
func (*DropCreateWriteWorkload) Check(_ driver.Driver) (bool, error)
func (*DropCreateWriteWorkload) Setup ¶
func (w *DropCreateWriteWorkload) Setup(client driver.Driver) error
func (*DropCreateWriteWorkload) Start ¶
func (w *DropCreateWriteWorkload) Start(client driver.Driver) (int64, error)
func (*DropCreateWriteWorkload) Type ¶
func (*DropCreateWriteWorkload) Type() string
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) Start ¶
func (w *InsertOnlyWorkload) Start(client driver.Driver) (int64, error)
func (*InsertOnlyWorkload) Type ¶
func (*InsertOnlyWorkload) Type() string
type Nested ¶
type Nested struct { Timestamp int64 `json:"timestamp" fake:"{nanosecond}"` Random string `json:"random" fake:"{paragraph:10,10,50}"` Random1 string `json:"random1" fake:"{paragraph:10,10,50}"` Random2 string `json:"random2" fake:"{paragraph:10,10,50}"` Random3 string `json:"random3" fake:"{paragraph:10,10,50}"` Random4 string `json:"random4" fake:"{paragraph:10,10,50}"` Random5 string `json:"random5" fake:"{paragraph:10,10,50}"` Random6 string `json:"random6" fake:"{paragraph:10,10,50}"` Random7 string `json:"random7" fake:"{paragraph:10,10,50}"` Random8 string `json:"random8" fake:"{paragraph:10,10,50}"` Random9 string `json:"random9" fake:"{paragraph:10,10,50}"` Random10 string `json:"random10" fake:"{paragraph:10,10,50}"` Name string `json:"name" fake:"{paragraph:10,10,50}"` URL string `json:"url" fake:"{paragraph:10,10,50}"` Domain string `json:"domain" fake:"{sentence:50}"` Sentence string `json:"sentence" fake:"{paragraph:10,10,50}"` Company string `json:"company" fake:"{paragraph:10,10,50}"` Labels []string `json:"labels" fakesize:"20000"` Address Address `json:"address"` NestedId string `json:"nested_id" fake:"{uuid}"` }
type QueueDocuments ¶
func NewQueueDocuments ¶
func NewQueueDocuments(collection string) *QueueDocuments
func (*QueueDocuments) Add ¶
func (q *QueueDocuments) Add(doc IDocument)
type ReplaceOnlyWorkload ¶
type ReplaceOnlyWorkload struct { Threads int16 Records int64 Database string Collections []string Schemas [][]byte WorkloadData *Queue }
func (*ReplaceOnlyWorkload) Check ¶
func (w *ReplaceOnlyWorkload) Check(client driver.Driver) (bool, error)
func (*ReplaceOnlyWorkload) Start ¶
func (w *ReplaceOnlyWorkload) Start(client driver.Driver) (int64, error)
func (*ReplaceOnlyWorkload) Type ¶
func (*ReplaceOnlyWorkload) Type() string
type SearchOnlyWorkload ¶
type SearchOnlyWorkload struct { Threads int16 Records int64 Project string Index string Schema []byte WorkloadData *Queue }
func (*SearchOnlyWorkload) Check ¶
func (w *SearchOnlyWorkload) Check(client driver.Driver) (bool, error)
func (*SearchOnlyWorkload) Start ¶
func (w *SearchOnlyWorkload) Start(client driver.Driver) (int64, error)
func (*SearchOnlyWorkload) Type ¶
func (*SearchOnlyWorkload) Type() string
type SmallConciseWorkload ¶
type SmallConciseWorkload struct { Threads int16 Records int64 Database string Collections []string Schemas [][]byte WorkloadData *Queue }
func (*SmallConciseWorkload) Check ¶
func (*SmallConciseWorkload) Check(_ driver.Driver) (bool, error)
func (*SmallConciseWorkload) Start ¶
func (w *SmallConciseWorkload) Start(client driver.Driver) (int64, error)
func (*SmallConciseWorkload) Type ¶
func (*SmallConciseWorkload) Type() string
Click to show internal directories.
Click to hide internal directories.