Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for sinceInSeconds (0.28 sec)

  1. 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)
  2. 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)
  3. 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)
  4. pkg/kubelet/cm/cgroup_manager_linux.go

    // Destroy destroys the specified cgroup
    func (m *cgroupManagerImpl) Destroy(cgroupConfig *CgroupConfig) error {
    	start := time.Now()
    	defer func() {
    		metrics.CgroupManagerDuration.WithLabelValues("destroy").Observe(metrics.SinceInSeconds(start))
    	}()
    
    	libcontainerCgroupConfig := m.libctCgroupConfig(cgroupConfig, false)
    	manager, err := manager.New(libcontainerCgroupConfig)
    	if err != nil {
    		return err
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 13:02:15 UTC 2023
    - 26.5K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. pkg/kubelet/pod_workers.go

    		p.cleanupUnstartedPod(update.Options.Pod, status)
    		status.working = false
    		if start := update.Options.StartTime; !start.IsZero() {
    			metrics.PodWorkerDuration.WithLabelValues("terminated").Observe(metrics.SinceInSeconds(start))
    		}
    		klog.V(4).InfoS("Pod cannot start ever", "pod", klog.KObj(update.Options.Pod), "podUID", podUID, "updateType", update.WorkType)
    		return ctx, update, canStart, canEverStart, true
    	case !canStart:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 02 13:22:37 UTC 2024
    - 74.8K bytes
    - Viewed (0)
  8. pkg/kubelet/eviction/eviction_manager.go

    	for _, t := range thresholds {
    		timeObserved := observations[t.Signal].time
    		if !timeObserved.IsZero() {
    			metrics.EvictionStatsAge.WithLabelValues(string(t.Signal)).Observe(metrics.SinceInSeconds(timeObserved.Time))
    		}
    	}
    
    	// we kill at most a single pod during each eviction interval
    	for i := range activePods {
    		pod := activePods[i]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 27 18:55:56 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  9. pkg/proxy/nftables/proxier.go

    	// Below this point we will not return until we try to write the nftables rules.
    	//
    
    	// Keep track of how long syncs take.
    	start := time.Now()
    	defer func() {
    		metrics.SyncProxyRulesLatency.Observe(metrics.SinceInSeconds(start))
    		proxier.logger.V(2).Info("SyncProxyRules complete", "elapsed", time.Since(start))
    	}()
    
    	serviceUpdateResult := proxier.svcPortMap.Update(proxier.serviceChanges)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 08 13:48:54 UTC 2024
    - 55.5K bytes
    - Viewed (0)
  10. pkg/proxy/ipvs/proxier.go

    	// and the mutex is held.
    	defer func() {
    		proxier.initialSync = false
    	}()
    
    	// Keep track of how long syncs take.
    	start := time.Now()
    	defer func() {
    		metrics.SyncProxyRulesLatency.Observe(metrics.SinceInSeconds(start))
    		proxier.logger.V(4).Info("syncProxyRules complete", "elapsed", time.Since(start))
    	}()
    
    	// We assume that if this was called, we really want to sync them,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Apr 28 15:51:23 UTC 2024
    - 77.7K bytes
    - Viewed (0)
Back to top