Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for testMetric (0.47 sec)

  1. 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)
  2. 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)
  3. src/internal/godebug/godebug_test.go

    		t.Setenv("GODEBUG", tt.godebug)
    		got := tt.setting.Value()
    		if got != tt.want {
    			t.Errorf("get(%q, %q) = %q; want %q", tt.godebug, tt.setting.Name(), got, tt.want)
    		}
    	}
    }
    
    func TestMetrics(t *testing.T) {
    	const name = "http2client" // must be a real name so runtime will accept it
    
    	var m [1]metrics.Sample
    	m[0].Name = "/godebug/non-default-behavior/" + name + ":events"
    	metrics.Read(m[:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. istioctl/pkg/metrics/metrics_test.go

    	for i, c := range cases {
    		t.Run(fmt.Sprintf("case %d %s", i, strings.Join(c.Args, " ")), func(t *testing.T) {
    			testutil.VerifyOutput(t, metricCmd, c)
    		})
    	}
    }
    
    func TestMetrics(t *testing.T) {
    	cases := []testutil.TestCase{
    		{ // case 0
    			Args:           strings.Split("details", " "),
    			ExpectedRegexp: regexp.MustCompile("could not build metrics for workload"),
    			WantException:  true,
    		},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Oct 25 02:07:44 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/endpoints/filters/metrics_test.go

    	"k8s.io/apiserver/pkg/authentication/user"
    	"k8s.io/apiserver/pkg/authorization/authorizer"
    	"k8s.io/component-base/metrics/legacyregistry"
    	"k8s.io/component-base/metrics/testutil"
    )
    
    func TestMetrics(t *testing.T) {
    	// Excluding authentication_duration_seconds since it is difficult to predict its values.
    	metrics := []string{
    		"authenticated_user_requests",
    		"authentication_attempts",
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 20 13:35:55 UTC 2023
    - 8.7K bytes
    - Viewed (0)
Back to top