- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for testMetric (0.22 sec)
-
pkg/kubelet/pleg/evented_test.go
expectedMetric = ` # HELP kubelet_running_pods [ALPHA] Number of pods that have a running pod sandbox # TYPE kubelet_running_pods gauge kubelet_running_pods 3 ` testMetric(t, expectedMetric, metrics.RunningPodCount.FQName()) } func testMetric(t *testing.T, expectedMetric string, metricName string) { err := testutil.GatherAndCompare(metrics.GetGather(), strings.NewReader(expectedMetric), metricName) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Apr 01 07:45:05 UTC 2023 - 6.4K bytes - Viewed (0) -
pkg/kubelet/kubelet_pods_test.go
} drainAllWorkers(podWorkers) tt.wantWorkerAfterRetry(t, podWorkers, processed) for k, v := range tt.expectMetricsAfterRetry { testMetric(t, k, v) } } }) } } func testMetric(t *testing.T, metricName string, expectedMetric string) { t.Helper() err := testutil.GatherAndCompare(metrics.GetGather(), strings.NewReader(expectedMetric), metricName)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 00:05:23 UTC 2024 - 198.8K bytes - Viewed (0) -
pkg/registry/core/service/ipallocator/bitmap_test.go
clusterIPAvailable.Reset() clusterIPAllocations.Reset() clusterIPAllocationErrors.Reset() } type testMetrics struct { free float64 used float64 allocated float64 errors float64 } func expectMetrics(t *testing.T, label string, em testMetrics) { var m testMetrics var err error m.free, err = testutil.GetGaugeMetricValue(clusterIPAvailable.WithLabelValues(label)) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 25 20:32:40 UTC 2023 - 21.1K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/metrics_test.go
Reset() []metrics.Registerable } func TestMetrics(t *testing.T) { featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, apiextensionsfeatures.CRDValidationRatcheting, true) // Wrap metric to keep time constant testMetrics := &fakeMetrics{original: validation.Metrics} validation.Metrics = testMetrics defer func() { validation.Metrics = testMetrics.original }() metricNames := []string{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 10.9K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/allocator_test.go
nodePortAvailable.Set(0) nodePortAllocations.Reset() nodePortAllocationErrors.Reset() } type testMetrics struct { free float64 used float64 allocated float64 errors float64 } func expectMetrics(t *testing.T, em testMetrics) { var m testMetrics var err error m.free, err = testutil.GetGaugeMetricValue(nodePortAvailable) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 08 07:15:02 UTC 2024 - 14K bytes - Viewed (0) -
pkg/controller/nodeipam/ipam/cidrset/cidr_set_test.go
cidrSetAllocationTriesPerRequest.Delete(labels) cidrSetMaxCidrs.Delete(labels) } type testMetrics struct { usage float64 allocs float64 releases float64 allocTries float64 max float64 } func expectMetrics(t *testing.T, label string, em testMetrics) { var m testMetrics var err error m.usage, err = testutil.GetGaugeMetricValue(cidrSetUsage.WithLabelValues(label))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 11 08:53:03 UTC 2023 - 29.5K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/controller/repair_test.go
nodePortRepairPortErrors.Reset() nodePortRepairReconcileErrors.Reset() } type testMetrics struct { leak float64 repair float64 outOfRange float64 duplicate float64 unknown float64 full float64 } func expectMetrics(t *testing.T, em testMetrics) { var m testMetrics var err error
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Sep 30 15:46:06 UTC 2023 - 10.6K bytes - Viewed (0) -
pkg/registry/core/service/ipallocator/controller/repair_test.go
} em := testMetrics{ leak: 0, repair: 5, outOfRange: 6, duplicate: 3, unknown: 0, invalid: 0, full: 0, } expectMetrics(t, em) } // Metrics helpers func clearMetrics() { clusterIPRepairIPErrors.Reset() clusterIPRepairReconcileErrors.Reset() } type testMetrics struct { leak float64
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Sep 30 15:46:06 UTC 2023 - 21.1K bytes - Viewed (0) -
pkg/registry/core/service/ipallocator/ipallocator_test.go
if err != nil { t.Fatalf("unexpected error creating CidrSet: %v", err) } b.EnableMetrics() // Check initial state em := testMetrics{ free: 0, used: 0, allocated: 0, errors: 0, } expectMetrics(t, cidrIPv4, em) em = testMetrics{ free: 0, used: 0, allocated: 0, errors: 0, } expectMetrics(t, cidrIPv6, em)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jun 25 13:14:46 UTC 2023 - 24.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/cache_test.go
} } } func generateKey(length int) (key []byte, err error) { key = make([]byte, length) if _, err = rand.Read(key); err != nil { return nil, err } return key, nil } func TestMetrics(t *testing.T) { fakeClock := testingclock.NewFakeClock(time.Now()) cache := newSimpleCache(fakeClock, 5*time.Second, "panda") var record sync.Map var cacheSize atomic.Uint64
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 31 20:26:58 UTC 2023 - 4.9K bytes - Viewed (0)