Documentation ¶
Index ¶
- Variables
- func GetAppSystemCpuUsagePromql(trace *model.Trace) string
- func GetAppUserCpuUsagePromql(trace *model.Trace) string
- func GetCpuCfsThrottledPromql(trace *model.Trace) string
- func GetCpuCfsThrottledTimeSeriesPromql(trace *model.Trace) string
- func GetNodeCpuPromql(trace *model.Trace, mode string) string
- func GetNodeCpuSeriesPromql(trace *model.Trace, mode string) string
- func GetNodeThroughputPromql(trace *model.Trace) string
- func GetP90Promql(trace *model.Trace, cpuType uint8) string
- type PrometheusClient
- func (client *PrometheusClient) QueryMetric(flowId uint64, endTime uint64, query string) (float64, error)
- func (client *PrometheusClient) QueryP90(trace *model.Trace) float64
- func (client *PrometheusClient) QueryTimeSeriesMatrix(flowId uint64, endTime uint64, step time.Duration, duration string, ...) (prometheus_model.Matrix, error)
- type PromqType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( P90DurationsNode []string P90DurationsPod []string )
Functions ¶
func GetAppSystemCpuUsagePromql ¶
GetAppSystemCpuUsagePromql 获取容器应用系统CPU占用
func GetAppUserCpuUsagePromql ¶
获取容器应用用户CPU占用
func GetCpuCfsThrottledPromql ¶
GetCpuCfsThrottledPromql 获取容器饱和度 TODO 现基于containerId模糊查询,以后基于conatinerName完全匹配
func GetNodeCpuPromql ¶
GetNodeCpuPromql 获取主机CPU使用
func GetNodeThroughputPromql ¶
GetNodeThroughputPromql 获取主机节点吞吐量
Types ¶
type PrometheusClient ¶
type PrometheusClient struct {
// contains filtered or unexported fields
}
func NewPrometheusClient ¶
func NewPrometheusClient(address string) (*PrometheusClient, error)
func (*PrometheusClient) QueryMetric ¶
func (*PrometheusClient) QueryP90 ¶
func (client *PrometheusClient) QueryP90(trace *model.Trace) float64
func (*PrometheusClient) QueryTimeSeriesMatrix ¶
func (client *PrometheusClient) QueryTimeSeriesMatrix(flowId uint64, endTime uint64, step time.Duration, duration string, query string) (prometheus_model.Matrix, error)
Click to show internal directories.
Click to hide internal directories.