Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for SinceInSeconds (0.42 sec)

  1. pkg/scheduler/framework/runtime/framework.go

    	skipPlugins := sets.New[string]()
    	defer func() {
    		state.SkipFilterPlugins = skipPlugins
    		metrics.FrameworkExtensionPointDuration.WithLabelValues(metrics.PreFilter, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime))
    	}()
    	var result *framework.PreFilterResult
    	var pluginsWithNodes []string
    	logger := klog.FromContext(ctx)
    	verboseLogs := logger.V(4).Enabled()
    	if verboseLogs {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 60.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go

    }
    
    // Reset resets the etcd_request_duration_seconds metric.
    func Reset() {
    	etcdRequestLatency.Reset()
    }
    
    // sinceInSeconds gets the time since the specified start in seconds.
    //
    // This is a variable to facilitate testing.
    var sinceInSeconds = func(start time.Time) float64 {
    	return time.Since(start).Seconds()
    }
    
    // UpdateEtcdDbSize sets the etcd_db_total_size_in_bytes metric.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 11 21:15:32 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. pkg/kubelet/kuberuntime/instrumented_services.go

    func recordOperation(operation string, start time.Time) {
    	metrics.RuntimeOperations.WithLabelValues(operation).Inc()
    	metrics.RuntimeOperationsDuration.WithLabelValues(operation).Observe(metrics.SinceInSeconds(start))
    }
    
    // recordError records error for metric if an error occurred.
    func recordError(operation string, err error) {
    	if err != nil {
    		metrics.RuntimeOperationsErrors.WithLabelValues(operation).Inc()
    	}
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 10:46:06 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  4. pkg/scheduler/schedule_one.go

    	metrics.PodScheduled(fwk.ProfileName(), metrics.SinceInSeconds(start))
    	metrics.PodSchedulingAttempts.Observe(float64(assumedPodInfo.Attempts))
    	if assumedPodInfo.InitialAttemptTimestamp != nil {
    		metrics.PodSchedulingDuration.WithLabelValues(getAttemptsLabel(assumedPodInfo)).Observe(metrics.SinceInSeconds(*assumedPodInfo.InitialAttemptTimestamp))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 13:28:08 UTC 2024
    - 43.4K bytes
    - Viewed (0)
  5. pkg/proxy/metrics/metrics.go

    		case kubeproxyconfig.ProxyModeKernelspace:
    			// currently no winkernel-specific metrics
    		}
    	})
    }
    
    // SinceInSeconds gets the time since the specified start in seconds.
    func SinceInSeconds(start time.Time) float64 {
    	return time.Since(start).Seconds()
    }
    
    var _ metrics.StableCollector = &nfacctMetricCollector{}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 14:39:54 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  6. pkg/scheduler/metrics/metrics.go

    // GatedPods returns the pending pods metrics with the label gated
    func GatedPods() metrics.GaugeMetric {
    	return pendingPods.With(metrics.Labels{"queue": "gated"})
    }
    
    // SinceInSeconds gets the time since the specified start in seconds.
    func SinceInSeconds(start time.Time) float64 {
    	return time.Since(start).Seconds()
    }
    
    func UnschedulableReason(plugin string, profile string) metrics.GaugeMetric {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 08:22:53 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics_test.go

    				t.Fatal(err)
    			}
    		})
    	}
    }
    
    func TestRecordEtcdRequest(t *testing.T) {
    	registry := metrics.NewKubeRegistry()
    
    	// modify default sinceInSeconds to constant NOW
    	sinceInSeconds = func(t time.Time) float64 {
    		return time.Unix(0, 300*int64(time.Millisecond)).Sub(t).Seconds()
    	}
    
    	testedMetrics := []metrics.Registerable{
    		etcdRequestCounts,
    		etcdRequestErrorCounts,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 11 21:15:32 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  8. pkg/kubelet/pleg/generic.go

    	if lastRelistTime := g.getRelistTime(); !lastRelistTime.IsZero() {
    		metrics.PLEGRelistInterval.Observe(metrics.SinceInSeconds(lastRelistTime))
    	}
    
    	timestamp := g.clock.Now()
    	defer func() {
    		metrics.PLEGRelistDuration.Observe(metrics.SinceInSeconds(timestamp))
    	}()
    
    	// Get all the pods.
    	podList, err := g.runtime.GetPods(ctx, true)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  9. pkg/kubelet/metrics/metrics.go

    // GetGather returns the gatherer. It used by test case outside current package.
    func GetGather() metrics.Gatherer {
    	return legacyregistry.DefaultGatherer
    }
    
    // SinceInSeconds gets the time since the specified start in seconds.
    func SinceInSeconds(start time.Time) float64 {
    	return time.Since(start).Seconds()
    }
    
    // SetNodeName sets the NodeName Gauge to 1.
    func SetNodeName(name types.NodeName) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 22 15:13:25 UTC 2024
    - 45.6K bytes
    - Viewed (0)
  10. pkg/proxy/iptables/proxier.go

    	// Keep track of how long syncs take.
    	start := time.Now()
    	defer func() {
    		metrics.SyncProxyRulesLatency.Observe(metrics.SinceInSeconds(start))
    		if tryPartialSync {
    			metrics.SyncPartialProxyRulesLatency.Observe(metrics.SinceInSeconds(start))
    		} else {
    			metrics.SyncFullProxyRulesLatency.Observe(metrics.SinceInSeconds(start))
    		}
    		proxier.logger.V(2).Info("SyncProxyRules complete", "elapsed", time.Since(start))
    	}()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 14:39:54 UTC 2024
    - 65.1K bytes
    - Viewed (0)
Back to top