Documentation ¶
Index ¶
- Variables
- func CreateBucket(service *s3.S3, bucket string) error
- func DeleteBucket(service *s3.S3, bucket string) error
- func DoWork(workChannel chan WorkItem, doneChannel chan bool)
- func GenerateRandomBytes(size uint64) []byte
- func GetCurrentPromValues(testConfig *common.TestCaseConfiguration) common.BenchmarkResult
- func GetExistingReadObjectList(service *s3.S3, prefix string, bucket string) ([]*s3.Object, error)
- func GetNextOperation(Queue *Workqueue) string
- func IncreaseOperationValue(operation string, value float64, Queue *Workqueue) error
- func InitPrometheus(prometheusPort int)
- func InitS3(config common.S3Configuration)
- func ListObjects(service *s3.S3, prefix string, bucket string) (*s3.ListObjectsOutput, error)
- type DeleteOperation
- type GBTransport
- type KV
- type ListOperation
- type ReadOperation
- type Stopper
- type Tracker
- type WorkItem
- type Workqueue
- type WriteOperation
Constants ¶
This section is empty.
Variables ¶
var CurrentTest string
var HousekeepingSvc *s3.S3
var PromTestEnd = prom.NewGaugeVec( prom.GaugeOpts{ Name: "test_end", Namespace: "gosbench", Help: "Determines the end time of a job for Grafana annotations", }, []string{"testName"})
var PromTestStart = prom.NewGaugeVec( prom.GaugeOpts{ Name: "test_start", Namespace: "gosbench", Help: "Determines the start time of a job for Grafana annotations", }, []string{"testName"})
var RandomData []byte
var WorkCancel context.CancelFunc
WorkCancel is the function to stop the execution of jobs
var WorkContext context.Context
Functions ¶
func DoWork ¶
DoWork processes the workitems in the workChannel until either the time runs out or a stopper is found
func GenerateRandomBytes ¶
func GetCurrentPromValues ¶
func GetCurrentPromValues(testConfig *common.TestCaseConfiguration) common.BenchmarkResult
func GetNextOperation ¶
GetNextOperation evaluates the operation values and returns which operation should happen next
func IncreaseOperationValue ¶
IncreaseOperationValue increases the given operation's value by the set amount
func InitPrometheus ¶
func InitPrometheus(prometheusPort int)
func InitS3 ¶
func InitS3(config common.S3Configuration)
InitS3 initialises the S3 session Also starts the Prometheus exporter on Port 8888
func ListObjects ¶
Types ¶
type DeleteOperation ¶
type DeleteOperation struct { TestName string Bucket string ObjectName string ObjectSize uint64 WorksOnPreexistingObject bool MPUEnabled bool PartSize uint64 MPUConcurrency int }
DeleteOperation stands for a delete operation
func (DeleteOperation) Clean ¶
func (op DeleteOperation) Clean() error
Clean removes the objects and buckets left from the previous DeleteOperation
func (DeleteOperation) Do ¶
func (op DeleteOperation) Do() error
Do executes the actual work of the DeleteOperation
func (DeleteOperation) Prepare ¶
func (op DeleteOperation) Prepare() error
Prepare prepares the execution of the DeleteOperation
type GBTransport ¶
type GBTransport struct {
Base http.RoundTripper
}
type ListOperation ¶
type ListOperation struct { TestName string Bucket string ObjectName string ObjectSize uint64 MPUEnabled bool PartSize uint64 MPUConcurrency int }
ListOperation stands for a list operation
func (ListOperation) Clean ¶
func (op ListOperation) Clean() error
Clean removes the objects and buckets left from the previous ListOperation
func (ListOperation) Do ¶
func (op ListOperation) Do() error
Do executes the actual work of the ListOperation
func (ListOperation) Prepare ¶
func (op ListOperation) Prepare() error
Prepare prepares the execution of the ListOperation
type ReadOperation ¶
type ReadOperation struct { TestName string Bucket string ObjectName string ObjectSize uint64 WorksOnPreexistingObject bool MPUEnabled bool PartSize uint64 MPUConcurrency int }
ReadOperation stands for a read operation
func (ReadOperation) Clean ¶
func (op ReadOperation) Clean() error
Clean removes the objects and buckets left from the previous ReadOperation
func (ReadOperation) Do ¶
func (op ReadOperation) Do() error
Do executes the actual work of the ReadOperation
func (ReadOperation) Prepare ¶
func (op ReadOperation) Prepare() error
Prepare prepares the execution of the ReadOperation
type Stopper ¶
type Stopper struct{}
Stopper marks the end of a workqueue when using maxOps as testCase end criterium
type Tracker ¶
func (*Tracker) GotFirstResponseByte ¶
func (tr *Tracker) GotFirstResponseByte()
GotFirstResponseByte is called when the first byte of the response headers is available.
func (*Tracker) WroteRequest ¶
func (tr *Tracker) WroteRequest(wroteRequest httptrace.WroteRequestInfo)
WroteRequest is called with the result of writing the request and any body. It may be called multiple times in the case of retried requests.
type WorkItem ¶
WorkItem is an interface for general work operations They can be read,write,list,delete or a stopper
type Workqueue ¶
Workqueue contains the Queue and the valid operation's values to determine which operation should be done next in order to satisfy the set ratios.
type WriteOperation ¶
type WriteOperation struct { TestName string Bucket string ObjectName string ObjectSize uint64 MPUEnabled bool PartSize uint64 MPUConcurrency int }
WriteOperation stands for a write operation
func (WriteOperation) Clean ¶
func (op WriteOperation) Clean() error
Clean removes the objects and buckets left from the previous WriteOperation
func (WriteOperation) Do ¶
func (op WriteOperation) Do() error
Do executes the actual work of the WriteOperation
func (WriteOperation) Prepare ¶
func (op WriteOperation) Prepare() error
Prepare prepares the execution of the WriteOperation