Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 642 for Metric2 (0.4 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. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. staging/src/k8s.io/apiserver/pkg/audit/metrics.go

    		})
    	errorCounter = metrics.NewCounterVec(
    		&metrics.CounterOpts{
    			Subsystem: subsystem,
    			Name:      "error_total",
    			Help: "Counter of audit events that failed to be audited properly. " +
    				"Plugin identifies the plugin affected by the error.",
    			StabilityLevel: metrics.ALPHA,
    		},
    		[]string{"plugin"},
    	)
    	levelCounter = metrics.NewCounterVec(
    		&metrics.CounterOpts{
    			Subsystem:      subsystem,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 13 00:46:24 UTC 2021
    - 3.6K bytes
    - Viewed (0)
  8. pkg/controller/job/metrics/metrics.go

    	//   action:          reconciling, tracking, pods_created, pods_deleted
    	JobSyncDurationSeconds = metrics.NewHistogramVec(
    		&metrics.HistogramOpts{
    			Subsystem:      JobControllerSubsystem,
    			Name:           "job_sync_duration_seconds",
    			Help:           "The time it took to sync a job",
    			StabilityLevel: metrics.STABLE,
    			Buckets:        metrics.ExponentialBuckets(0.004, 2, 15),
    		},
    		[]string{"completion_mode", "result", "action"},
    	)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 05 17:25:15 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/authentication/authenticatorfactory/metrics.go

    package authenticatorfactory
    
    import (
    	"context"
    
    	compbasemetrics "k8s.io/component-base/metrics"
    	"k8s.io/component-base/metrics/legacyregistry"
    )
    
    type registerables []compbasemetrics.Registerable
    
    // init registers all metrics.
    func init() {
    	for _, metric := range metrics {
    		legacyregistry.MustRegister(metric)
    	}
    }
    
    var (
    	requestTotal = compbasemetrics.NewCounterVec(
    		&compbasemetrics.CounterOpts{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 29 07:49:14 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  10. pkg/volume/util/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 StorageOperationMetric = metrics.NewHistogramVec(
    	&metrics.HistogramOpts{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 23 23:05:31 UTC 2022
    - 5.8K bytes
    - Viewed (0)
Back to top