18 lines
380 B
Go
18 lines
380 B
Go
package tracker
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestGetNamedMetrics(t *testing.T) {
|
|
client, _ := NewPrometheus("http://10.101.15.3:32585")
|
|
result := client.GetNamedMetrics([]string{"pod_cpu_resource_limits"}, time.Now(), PodOption{
|
|
|
|
PodName: "prometheus-k8s-0",
|
|
NamespaceName: "monitoring-system",
|
|
})
|
|
println("zzz", result[0].MetricValues[0].Sample.Value())
|
|
|
|
}
|