Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubeGroupVersionResource ¶
type KubeGroupVersionResource struct {
// Group is the name about a collection of related functionality.
Group string `json:"group" yaml:"group"`
// Version is a version of that group.
Version string `json:"version" yaml:"version"`
// Resource is a type in that versioned group APIs.
Resource string `json:"resource" yaml:"resource"`
}
KubeGroupVersionResource identifies the resource URI.
func (*KubeGroupVersionResource) Validate ¶
func (m *KubeGroupVersionResource) Validate() error
Validate validates KubeGroupVersionResource.
type LoadProfile ¶
type LoadProfile struct {
// Version defines the version of this object.
Version int `json:"version" yaml:"version"`
// Description is a string value to describe this object.
Description string `json:"description,omitempty" yaml:"description"`
// Spec defines behavior of load profile.
Spec LoadProfileSpec `json:"spec" yaml:"spec"`
}
LoadProfile defines how to create load traffic from one host to kube-apiserver.
func (LoadProfile) Validate ¶
func (lp LoadProfile) Validate() error
Validate verifies fields of LoadProfile.
type LoadProfileSpec ¶
type LoadProfileSpec struct {
// Rate defines the maximum requests per second (zero is no limit).
Rate int `json:"rate" yaml:"rate"`
// Total defines the total number of requests.
Total int `json:"total" yaml:"total"`
// Conns defines total number of long connections used for traffic.
Conns int `json:"conns" yaml:"conns"`
// Requests defines the different kinds of requests with weights.
// The executor should randomly pick by weight.
Requests []*WeightedRequest
}
LoadProfileSpec defines the load traffic for traget resource.
func (LoadProfileSpec) Validate ¶
func (spec LoadProfileSpec) Validate() error
Validate verifies fields of LoadProfileSpec.
type RequestGet ¶
type RequestGet struct {
// KubeGroupVersionResource identifies the resource URI.
KubeGroupVersionResource `yaml:",inline"`
// Namespace is object's namespace.
Namespace string `json:"namespace" yaml:"namespace"`
// Name is object's name.
Name string `json:"name" yaml:"name"`
}
RequestGet defines GET request for target object.
func (*RequestGet) Validate ¶
func (r *RequestGet) Validate() error
Validate validates RequestGet type.
type RequestList ¶
type RequestList struct {
// KubeGroupVersionResource identifies the resource URI.
KubeGroupVersionResource `yaml:",inline"`
// Namespace is object's namespace.
Namespace string `json:"namespace" yaml:"namespace"`
// Limit defines the page size.
Limit int `json:"limit" yaml:"limit"`
// Selector defines how to identify a set of objects.
Selector string `json:"seletor" yaml:"seletor"`
}
RequestList defines LIST request for target objects.
func (*RequestList) Validate ¶
func (r *RequestList) Validate() error
RequestList validates RequestList type.
type RequestPut ¶
type RequestPut struct {
// KubeGroupVersionResource identifies the resource URI.
//
// NOTE: Currently, it should be configmap or secrets because we can
// generate random bytes as blob for it. However, for the pod resource,
// we need to ensure a lot of things are ready, for instance, volumes,
// resource capacity. It's not easy to generate it randomly. Maybe we
// can introduce pod template in the future.
KubeGroupVersionResource `yaml:",inline"`
// Namespace is object's namespace.
Namespace string `json:"namespace" yaml:"namespace"`
// Name is object's prefix name.
Name string `json:"name" yaml:"name"`
// KeySpaceSize is used to generate random number as name's suffix.
KeySpaceSize int `json:"keySpaceSize" yaml:"keySpaceSize"`
// ValueSize is the object's size in bytes.
ValueSize int `json:"valueSize" yaml:"valueSize"`
}
RequestPut defines PUT request for target resource type.
func (*RequestPut) Validate ¶
func (r *RequestPut) Validate() error
Validate validates RequestPut type.
type ResponseStats ¶
type ResponseStats struct {
// Total represents total number of requests.
Total int
// List of failures
FailureList []error
// Duration means the time of benchmark.
Duration time.Duration
// PercentileLatencies represents the latency distribution in seconds.
//
// NOTE: The key represents quantile.
PercentileLatencies map[float64]float64
}
ResponseStats is the report about benchmark result.
type WeightedRequest ¶
type WeightedRequest struct {
Shares int `json:"shares" yaml:"shares"`
// StaleList means this list request with zero resource version.
StaleList *RequestList `json:"staleList" yaml:"staleList"`
// QuorumList means this list request without kube-apiserver cache.
QuorumList *RequestList `json:"quorumList" yaml:"quorumList"`
// StaleGet means this get request with zero resource version.
StaleGet *RequestGet `json:"staleGet" yaml:"staleGet"`
// QuorumGet means this get request without kube-apiserver cache.
QuorumGet *RequestGet `json:"quorumGet" yaml:"quorumGet"`
// Put means this is mutating request.
Put *RequestPut `json:"put" yaml:"put"`
}
WeightedRequest represents request with weight. Only one of request types may be specified.
func (WeightedRequest) Validate ¶
func (r WeightedRequest) Validate() error
Validate verifies fields of WeightedRequest.