Documentation ¶
Index ¶
Constants ¶
View Source
const (
// NA Not available.
NA = "N/A"
)
View Source
const UnknownTime = "UNKNOWN"
UnknownTime represent the time can't successfully be formatted
Variables ¶
This section is empty.
Functions ¶
func TimeFormat ¶
TimeFormat format time data of `time.Duration` type to string type
func ToPercentage ¶
ToPercentage computes percentage as string otherwise n/aa.
func ToPercentageStr ¶
ToPercentageStr computes percentage, but if v2 is 0, it will return NAValue instead of 0.
Types ¶
type Metric ¶
Metric including requests and limits metrics
func GatherPodMX ¶
func GatherPodMX(pod *v1.Pod, mx *v1beta1.PodMetrics) (c, r Metric)
GatherPodMX return the usage metrics of a pod and specified metric including requests and limits metrics
Click to show internal directories.
Click to hide internal directories.