Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewLazyMetricWithTimestamp (0.2 sec)

  1. pkg/kubelet/metrics/collectors/resource_metrics.go

    	}
    }
    
    func (rc *resourceMetricsCollector) collectNodeCPUMetrics(ch chan<- metrics.Metric, s summary.NodeStats) {
    	if s.CPU == nil || s.CPU.UsageCoreNanoSeconds == nil {
    		return
    	}
    
    	ch <- metrics.NewLazyMetricWithTimestamp(s.CPU.Time.Time,
    		metrics.NewLazyConstMetric(nodeCPUUsageDesc, metrics.CounterValue, float64(*s.CPU.UsageCoreNanoSeconds)/float64(time.Second)))
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 08 07:13:37 UTC 2023
    - 9.2K bytes
    - Viewed (1)
  2. pkg/kubelet/metrics/collectors/cri_metrics.go

    	// as opposed to on-demand.
    	// If the metric was requested as needed, then Timestamp==0.
    	if m.Timestamp == 0 {
    		return pm, nil
    	}
    	return metrics.NewLazyMetricWithTimestamp(time.Unix(0, m.Timestamp), pm), nil
    }
    
    var criTypeToProm = map[runtimeapi.MetricType]metrics.ValueType{
    	runtimeapi.MetricType_COUNTER: metrics.CounterValue,
    	runtimeapi.MetricType_GAUGE:   metrics.GaugeValue,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 23 13:24:29 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top