Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for celmetrics (0.13 sec)

  1. staging/src/k8s.io/apiserver/pkg/cel/metrics/metrics.go

    const (
    	namespace = "apiserver"
    	subsystem = "cel"
    )
    
    // Metrics provides access to CEL metrics.
    var Metrics = newCelMetrics()
    
    type CelMetrics struct {
    	compilationTime *metrics.Histogram
    	evaluationTime  *metrics.Histogram
    }
    
    func newCelMetrics() *CelMetrics {
    	m := &CelMetrics{
    		compilationTime: metrics.NewHistogram(&metrics.HistogramOpts{
    			Namespace:      namespace,
    			Subsystem:      subsystem,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 09 23:50:48 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/authorization/authorizerfactory/metrics.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package authorizerfactory
    
    import (
    	"context"
    	"sync"
    
    	celmetrics "k8s.io/apiserver/pkg/authorization/cel"
    	webhookmetrics "k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics"
    	compbasemetrics "k8s.io/component-base/metrics"
    	"k8s.io/component-base/metrics/legacyregistry"
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:01:15 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/dispatcher.go

    									Binding:        binding,
    									PolicyDecision: decision,
    								})
    								celmetrics.Metrics.ObserveRejection(ctx, decision.Elapsed, definition.Name, binding.Name, "active")
    							case admissionregistrationv1.Audit:
    								publishValidationFailureAnnotation(binding, i, decision, versionedAttr)
    								celmetrics.Metrics.ObserveAudit(ctx, decision.Elapsed, definition.Name, binding.Name, "active")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go

    					`, "wh1.example.com", "Webhook", "wh2.example.com", "Webhook"),
    		},
    	}
    
    	for _, tt := range testCases {
    		t.Run(tt.name, func(t *testing.T) {
    			celmetrics.ResetMetricsForTest()
    			defer celmetrics.ResetMetricsForTest()
    			wh1, err := newV1Authorizer(s.URL, clientCert, clientKey, caCert, 0, celAuthorizerMetrics(), tt.expressions1, "wh1.example.com")
    			if err != nil {
    				t.Fatal(err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  5. cmd/metrics-realtime.go

    			m.Aggregated.Net.NetStats = netStats
    		}
    	}
    	if types.Contains(madmin.MetricsMem) {
    		m.Aggregated.Mem = &madmin.MemMetrics{
    			CollectedAt: UTCNow(),
    		}
    		m.Aggregated.Mem.Info = madmin.GetMemInfo(GlobalContext, byHostName)
    	}
    	if types.Contains(madmin.MetricsCPU) {
    		m.Aggregated.CPU = &madmin.CPUMetrics{
    			CollectedAt: UTCNow(),
    		}
    		cm, err := c.Times(false)
    		if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Jun 01 05:16:24 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. pkg/volume/metrics_du_test.go

    	}
    	actual, err = metrics.GetMetrics()
    	if err != nil {
    		t.Errorf("Unexpected error when calling GetMetrics %v", err)
    	}
    	if e, a := previousInodes, actual.InodesUsed.Value(); e != a {
    		t.Errorf("Unexpected Used for directory with file.  Expected %v, got %d.", e, a)
    	}
    
    }
    
    // TestMetricsDuRequireInit tests that if MetricsDu is not initialized with a path, GetMetrics
    // returns an error
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 14:49:03 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  7. pkg/volume/metrics_cached.go

    	return &cachedMetrics{wrapped: provider}
    }
    
    // GetMetrics runs the wrapped metrics provider's GetMetrics method once and
    // caches the result. Will not cache result if there is an error.
    // See MetricsProvider.GetMetrics
    func (md *cachedMetrics) GetMetrics() (*Metrics, error) {
    	md.once.cache(func() error {
    		md.resultMetrics, md.resultError = md.wrapped.GetMetrics()
    		return md.resultError
    	})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 11:12:06 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  8. pkg/volume/metrics_statfs_test.go

    func TestGetMetricsStatFS(t *testing.T) {
    	metrics := NewMetricsStatFS("")
    	actual, err := metrics.GetMetrics()
    	expected := &Metrics{}
    	if !volumetest.MetricsEqualIgnoreTimestamp(actual, expected) {
    		t.Errorf("Expected empty Metrics from uninitialized MetricsStatFS, actual %v", *actual)
    	}
    	if err == nil {
    		t.Errorf("Expected error when calling GetMetrics on uninitialized MetricsStatFS, actual nil")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 02 23:01:59 UTC 2017
    - 2K bytes
    - Viewed (0)
  9. cmd/metrics-v3-system-cpu.go

    func loadCPUMetrics(ctx context.Context, m MetricValues, c *metricsCache) error {
    	cpuMetrics, _ := c.cpuMetrics.Get()
    
    	if cpuMetrics.LoadStat != nil {
    		m.Set(sysCPULoad, cpuMetrics.LoadStat.Load1)
    		perc := cpuMetrics.LoadStat.Load1 * 100 / float64(cpuMetrics.CPUCount)
    		m.Set(sysCPULoadPerc, math.Round(perc*100)/100)
    	}
    
    	ts := cpuMetrics.TimesStat
    	tot := ts.User + ts.System + ts.Idle + ts.Iowait + ts.Nice + ts.Steal
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Apr 23 23:56:12 UTC 2024
    - 3K bytes
    - Viewed (0)
  10. cmd/metrics-v3-system-memory.go

    	memMetrics, err := c.memoryMetrics.Get()
    	if err != nil {
    		metricsLogIf(ctx, err)
    		return err
    	}
    
    	m.Set(memTotal, float64(memMetrics.Total))
    	m.Set(memUsed, float64(memMetrics.Used))
    	usedPerc := float64(memMetrics.Used) * 100 / float64(memMetrics.Total)
    	m.Set(memUsedPerc, usedPerc)
    	m.Set(memFree, float64(memMetrics.Free))
    	m.Set(memBuffers, float64(memMetrics.Buffers))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Apr 17 05:10:25 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top