Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for setMetrics (0.15 sec)

  1. pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go

    			Reason:  nodeShutdownNotAdmittedReason,
    			Message: nodeShutdownNotAdmittedMessage,
    		}
    	}
    	return lifecycle.PodAdmitResult{Admit: true}
    }
    
    // setMetrics sets the metrics for the node shutdown manager.
    func (m *managerImpl) setMetrics() {
    	if m.enableMetrics && m.storage != nil {
    		sta := state{}
    		err := m.storage.Load(&sta)
    		if err != nil {
    			m.logger.Error(err, "Failed to load graceful shutdown state")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 09 08:02:40 UTC 2022
    - 15.5K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. pkg/volume/metrics_block_linux_test.go

    	metrics := NewMetricsBlock("")
    	actual, err := metrics.GetMetrics()
    	expected := &Metrics{}
    	if !volumetest.MetricsEqualIgnoreTimestamp(actual, expected) {
    		t.Errorf("Expected empty Metrics from uninitialized MetricsBlock, actual %v", *actual)
    	}
    	if err == nil {
    		t.Errorf("Expected error when calling GetMetrics on uninitialized MetricsBlock, actual nil")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 18 09:43:07 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  6. cmd/metrics-realtime.go

    	}
    	if types.Contains(madmin.MetricsSiteResync) {
    		m.Aggregated.SiteResync = globalSiteResyncMetrics.report(opts.depID)
    	}
    	if types.Contains(madmin.MetricNet) {
    		m.Aggregated.Net = &madmin.NetMetrics{
    			CollectedAt:   UTCNow(),
    			InterfaceName: globalInternodeInterface,
    		}
    		netStats, err := net.GetInterfaceNetStats(globalInternodeInterface)
    		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)
  7. pkg/volume/metrics_block.go

    }
    
    // See MetricsProvider.GetMetrics
    // GetMetrics detects the size of the BlockMode volume for the device node
    // where the Volume is attached.
    //
    // Note that only the capacity of the device can be detected with standard
    // tools. Storage systems may have more information that they can provide by
    // going through specialized APIs.
    func (mb *metricsBlock) GetMetrics() (*Metrics, error) {
    	startTime := time.Now()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 19 14:33:37 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  8. pkg/volume/metrics_du.go

    func NewMetricsDu(path string) MetricsProvider {
    	return &metricsDu{path}
    }
    
    // GetMetrics calculates the volume usage and device free space by executing "du"
    // and gathering filesystem info for the Volume path.
    // See MetricsProvider.GetMetrics
    func (md *metricsDu) GetMetrics() (*Metrics, error) {
    	metrics := &Metrics{Time: metav1.Now()}
    	if md.path == "" {
    		return metrics, NewNoPathDefinedError()
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 06 12:19:35 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  9. pkg/volume/metrics_nil_test.go

    	}
    }
    
    func TestMetricsNilGetCapacity(t *testing.T) {
    	metrics := &MetricsNil{}
    	actual, err := metrics.GetMetrics()
    	expected := &Metrics{}
    	if *actual != *expected {
    		t.Errorf("Expected empty Metrics, actual %v", *actual)
    	}
    	if err == nil {
    		t.Errorf("Expected error when calling GetMetrics, actual nil")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 20 15:10:23 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  10. pkg/volume/metrics_nil.go

    type MetricsNil struct{}
    
    // SupportsMetrics returns false for the MetricsNil type.
    func (*MetricsNil) SupportsMetrics() bool {
    	return false
    }
    
    // GetMetrics returns an empty Metrics and an error.
    // See MetricsProvider.GetMetrics
    func (*MetricsNil) GetMetrics() (*Metrics, error) {
    	return &Metrics{}, NewNotSupportedError()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 20 15:10:23 UTC 2021
    - 1.1K bytes
    - Viewed (0)
Back to top