Documentation ¶
Index ¶
- Variables
- func GetKubeClient() (*kubernetes.Clientset, error)
- func GetMetricsClient() (*metricsc.Clientset, error)
- type AuthConfig
- type ClusterConfig
- type DashboardConfig
- type ExecutorConfig
- type ExecutorContainer
- type HostAlias
- type HttpConfig
- type IngressConfig
- type JmeterContainer
- type LdapConfig
- type LogFormat
- type MySQLConfig
- type ObjectStorage
- type ShibuyaConfig
- type Toleration
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Average latency is not a good metric, percentile latency is the way to go // But percentiles cannot be aggregated, so we need seperate latency vector for individual observations CollectionLatencySummary = promauto.NewSummaryVec(prometheus.SummaryOpts{ Namespace: "shibuya", Name: "latency_collection", Help: "Percentile latency of a collection", Objectives: map[float64]float64{0.9: 0.01, 0.99: 0.001}, }, []string{"collection_id", "run_id"}) PlanLatencySummary = promauto.NewSummaryVec(prometheus.SummaryOpts{ Namespace: "shibuya", Name: "latency_plan", Help: "Percentile latency of a collection", Objectives: map[float64]float64{0.9: 0.01, 0.99: 0.001}, }, []string{"collection_id", "plan_id", "run_id"}) LabelLatencySummary = promauto.NewSummaryVec(prometheus.SummaryOpts{ Namespace: "shibuya", Name: "latency_label", Help: "Percentile latency of a collection", Objectives: map[float64]float64{0.9: 0.01, 0.99: 0.001}, }, []string{"collection_id", "label", "run_id"}) // This is similar to Latency but cannot use histogram here because we need a very accurate count of every status error that occured. // So 200s are different bucket than 201s responses. StatusCounter = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "shibuya", Name: "status_counter", Help: "stores count of responses and groups in buckets of response codes", }, []string{"collection_id", "plan_id", "run_id", "engine_no", "label", "status"}) // Gauge is the most intuitive way to count threads here. // We don't care about accuracy and there's no use of rate of threads ThreadsGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "shibuya", Name: "threads_gauge", Help: "Current number of threads running in JMeter", }, []string{"collection_id", "plan_id", "run_id", "engine_no"}) CpuGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "shibuya", Name: "cpu_gauge", Help: "CPU used by engine", }, []string{"collection_id", "plan_id", "engine_no"}) MemGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "shibuya", Name: "mem_gauge", Help: "Memory used by engine", }, []string{"collection_id", "plan_id", "engine_no"}) )
Functions ¶
func GetKubeClient ¶
func GetKubeClient() (*kubernetes.Clientset, error)
GetKubeClient creates a Kubernetes config and client for a given kubeconfig context.
func GetMetricsClient ¶
Types ¶
type AuthConfig ¶
type AuthConfig struct { AdminUsers []string `json:"admin_users"` NoAuth bool `json:"no_auth"` SessionKey string `json:"session_key"` *LdapConfig }
type ClusterConfig ¶
type ClusterConfig struct { Project string `json:"project"` Zone string `json:"zone"` Region string `json:"region"` ClusterID string `json:"cluster_id"` Kind string `json:"kind"` APIEndpoint string `json:"api_endpoint"` NodeCPUSpec int `json:"node_cpu_spec"` OnDemand bool `json:"on_demand"` GCDuration float64 `json:"gc_duration"` // in minutes ServiceType string `json:"service_type"` }
type DashboardConfig ¶
type ExecutorConfig ¶
type ExecutorConfig struct { InCluster bool `json:"in_cluster"` Namespace string `json:"namespace"` Cluster *ClusterConfig `json:"cluster"` ImagePullSecret string `json:"pull_secret"` ImagePullPolicy apiv1.PullPolicy `json:"pull_policy"` JmeterContainer *JmeterContainer `json:"jmeter"` HostAliases []*HostAlias `json:"host_aliases,omitempty"` NodeAffinity []map[string]string `json:"node_affinity"` Tolerations []Toleration `json:"tolerations"` MaxEnginesInCollection int `json:"max_engines_in_collection"` }
type ExecutorContainer ¶
type HttpConfig ¶
type HttpConfig struct {
Proxy string `json:"proxy"`
}
type IngressConfig ¶
type JmeterContainer ¶
type JmeterContainer struct {
*ExecutorContainer
}
type LdapConfig ¶
type MySQLConfig ¶
type ObjectStorage ¶
type ShibuyaConfig ¶
type ShibuyaConfig struct { ProjectHome string `json:"project_home"` UploadFileHelp string `json:"upload_file_help"` DBConf *MySQLConfig `json:"db"` ExecutorConfig *ExecutorConfig `json:"executors"` DashboardConfig *DashboardConfig `json:"dashboard"` HttpConfig *HttpConfig `json:"http_config"` AuthConfig *AuthConfig `json:"auth_config"` ObjectStorage *ObjectStorage `json:"object_storage"` LogFormat *LogFormat `json:"log_format"` BackgroundColour string `json:"bg_color"` IngressConfig *IngressConfig `json:"ingress"` EnableSid bool `json:"enable_sid"` // below are configs generated from above values DevMode bool Context string HTTPClient *http.Client HTTPProxyClient *http.Client DBC *sql.DB DBEndpoint string }
var SC *ShibuyaConfig
type Toleration ¶
type Toleration struct { Key string `json:"key"` Value string `json:"value"` Effect apiv1.TaintEffect `json:"effect"` }
Click to show internal directories.
Click to hide internal directories.