Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,328 for Metric2 (0.14 sec)

  1. src/go/parser/testdata/metrics.go2

    package metrics
    
    import "sync"
    
    type Metric1[T comparable] struct {
    	mu sync.Mutex
    	m  map[T]int
    }
    
    func (m *Metric1[T]) Add(v T) {
    	m.mu.Lock()
    	defer m.mu.Unlock()
    	if m.m == nil {
    		m.m = make(map[T]int)
    	}
    	m[v]++
    }
    
    type key2[T1, T2 comparable] struct {
    	f1 T1
    	f2 T2
    }
    
    type Metric2[T1, T2 cmp2] struct {
    	mu sync.Mutex
    	m  map[key2[T1, T2]]int
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 24 19:44:06 UTC 2020
    - 908 bytes
    - Viewed (0)
  2. cmd/metrics-v2.go

    		metricsGroupOpts: opts,
    	}
    	mg.RegisterRead(func(_ context.Context) (metrics []MetricV2) {
    		metrics = make([]MetricV2, 0, 16)
    		nodesUp, nodesDown := globalNotificationSys.GetPeerOnlineCount()
    		metrics = append(metrics, MetricV2{
    			Description: getNodeOnlineTotalMD(),
    			Value:       float64(nodesUp),
    		})
    		metrics = append(metrics, MetricV2{
    			Description: getNodeOfflineTotalMD(),
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 22:26:54 UTC 2024
    - 131.9K bytes
    - Viewed (0)
  3. cmd/metrics-resource.go

    	}
    
    	key := getResourceKey(name, labels)
    	metric, found := subsysMetrics[key]
    	if !found {
    		metric = ResourceMetric{
    			Name:   name,
    			Labels: labels,
    		}
    	}
    
    	if isCumulative {
    		metric.Current = val - metric.Cumulative
    		metric.Cumulative = val
    	} else {
    		metric.Current = val
    	}
    
    	if metric.Current > metric.Max {
    		metric.Max = val
    	}
    
    	metric.Sum += metric.Current
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 17 15:15:13 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/metrics.go

    	"k8s.io/component-base/metrics"
    	"k8s.io/component-base/metrics/legacyregistry"
    )
    
    var (
    	latencyBuckets = metrics.ExponentialBuckets(0.001, 2, 15)
    )
    
    // converterMetricFactory holds metrics for all CRD converters
    type converterMetricFactory struct {
    	// A map from a converter name to it's metric. Allows the converterMetric to be created
    	// again with the same metric for a specific converter (e.g. 'webhook').
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 07 19:34:33 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  5. pkg/controller/podautoscaler/monitor/metrics.go

    	}
    )
    
    var register sync.Once
    
    // Register all metrics.
    func Register() {
    	// Register the metrics.
    	register.Do(func() {
    		registerMetrics(metricsList...)
    	})
    }
    
    // RegisterMetrics registers a list of metrics.
    func registerMetrics(extraMetrics ...metrics.Registerable) {
    	for _, metric := range extraMetrics {
    		legacyregistry.MustRegister(metric)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 22:47:24 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go

     *
     * Promoting the stability level of the metric is a responsibility of the component owner, since it
     * involves explicitly acknowledging support for the metric across multiple releases, in accordance with
     * the metric stability policy.
     */
    var (
    	etcdRequestLatency = compbasemetrics.NewHistogramVec(
    		&compbasemetrics.HistogramOpts{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 11 21:15:32 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/value/metrics.go

    	"k8s.io/component-base/metrics"
    	"k8s.io/component-base/metrics/legacyregistry"
    )
    
    const (
    	namespace = "apiserver"
    	subsystem = "storage"
    )
    
    /*
     * By default, all the following metrics are defined as falling under
     * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/1209-metrics-stability/kubernetes-control-plane-metrics-stability.md#stability-classes)
     *
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 22:44:02 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  8. test/typeparam/metrics.go

    	}
    	if got, want := m1.Metrics(), []string{"a"}; !_SlicesEqual(got, want) {
    		panic(fmt.Sprintf("Metrics = %v, want %v", got, want))
    	}
    
    	m2 := _Metric2[int, float64]{}
    	m2.Add(1, 1)
    	m2.Add(2, 2)
    	m2.Add(3, 3)
    	m2.Add(3, 3)
    	k1, k2 := m2.Metrics()
    
    	sort.Ints(k1)
    	w1 := []int{1, 2, 3}
    	if !_SlicesEqual(k1, w1) {
    		panic(fmt.Sprintf("_Metric2.Metrics first slice = %v, want %v", k1, w1))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 4.4K bytes
    - Viewed (0)
  9. pkg/kubelet/pluginmanager/metrics/metrics.go

    func (c *totalPluginsCollector) DescribeWithStability(ch chan<- *metrics.Desc) {
    	ch <- totalPluginsDesc
    }
    
    // CollectWithStability implements the metrics.StableCollector interface.
    func (c *totalPluginsCollector) CollectWithStability(ch chan<- metrics.Metric) {
    	for stateName, pluginCount := range c.getPluginCount() {
    		for socketPath, count := range pluginCount {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 08 01:16:57 UTC 2019
    - 2.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/metrics/metrics.go

    		&metrics.HistogramOpts{
    			Namespace:      namespace,
    			Subsystem:      subsystem,
    			Name:           "dek_cache_inter_arrival_time_seconds",
    			Help:           "Time (in seconds) of inter arrival of transformation requests.",
    			StabilityLevel: metrics.ALPHA,
    			Buckets:        metrics.ExponentialBuckets(60, 2, 10),
    		},
    		[]string{"transformation_type"},
    	)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 09 22:31:32 UTC 2023
    - 12K bytes
    - Viewed (0)
Back to top