Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for MetricType (0.17 sec)

  1. cmd/metrics-v3-types.go

    }
    
    // MetricType - represents the type of a metric.
    type MetricType int
    
    const (
    	// CounterMT - represents a counter metric.
    	CounterMT MetricType = iota
    	// GaugeMT - represents a gauge metric.
    	GaugeMT
    	// HistogramMT - represents a histogram metric.
    	HistogramMT
    	// rangeL - represents a range label.
    	rangeL = "range"
    )
    
    func (mt MetricType) String() string {
    	switch mt {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 23 07:41:18 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  2. cmd/metrics-realtime.go

    	"github.com/shirou/gopsutil/v3/load"
    )
    
    type collectMetricsOpts struct {
    	hosts map[string]struct{}
    	disks map[string]struct{}
    	jobID string
    	depID string
    }
    
    func collectLocalMetrics(types madmin.MetricType, opts collectMetricsOpts) (m madmin.RealtimeMetrics) {
    	if types == madmin.MetricsNone {
    		return
    	}
    
    	byHostName := globalMinioAddr
    	if len(opts.hosts) > 0 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Jun 01 05:16:24 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. cmd/metrics-v3-cache.go

    		loadDriveMetrics)
    }
    
    func newCPUMetricsCache() *cachevalue.Cache[madmin.CPUMetrics] {
    	loadCPUMetrics := func(ctx context.Context) (v madmin.CPUMetrics, err error) {
    		var types madmin.MetricType = madmin.MetricsCPU
    
    		m := collectLocalMetrics(types, collectMetricsOpts{
    			hosts: map[string]struct{}{
    				globalLocalNodeName: {},
    			},
    		})
    
    		for _, hm := range m.ByHost {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 09 00:51:34 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  4. pkg/controller/podautoscaler/horizontal_test.go

    	}
    
    	for metricType, l := range tc.expectedReportedMetricComputationActionLabels {
    		_, ok := m.metricComputationActionLabels[metricType]
    		if !ok {
    			t.Fatalf("the metric computation action should be recorded with metricType %s, but actually nothing was recorded", metricType)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 199.3K bytes
    - Viewed (0)
  5. cmd/metrics-v3-system-drive.go

    	drivePercUtilMD = NewGaugeMD(drivePercUtil,
    		"Percentage of time the disk was busy",
    		allDriveLabels...)
    )
    
    func getCurrentDriveIOStats() map[string]madmin.DiskIOStats {
    	var types madmin.MetricType = madmin.MetricsDisk
    	driveRealtimeMetrics := collectLocalMetrics(types, collectMetricsOpts{
    		hosts: map[string]struct{}{
    			globalLocalNodeName: {},
    		},
    	})
    
    	stats := map[string]madmin.DiskIOStats{}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun May 12 17:23:50 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  6. cmd/metrics-v2.go

    				}
    			} else {
    				out <- pmetric
    			}
    		}
    		return
    	}
    	metricType := prometheus.GaugeValue
    	if metric.Description.Type == counterMetric {
    		metricType = prometheus.CounterValue
    	}
    	pmetric, err := prometheus.NewConstMetric(
    		prometheus.NewDesc(
    			prometheus.BuildFQName(string(metric.Description.Namespace),
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 22:26:54 UTC 2024
    - 131.9K bytes
    - Viewed (0)
  7. cmd/metrics-resource.go

    			updateResourceMetrics(driveSubsystem, totalInodes, float64(di.FreeInodes+di.UsedInodes), labels, false)
    		}
    	}
    }
    
    func collectLocalResourceMetrics() {
    	var types madmin.MetricType = madmin.MetricsDisk | madmin.MetricNet | madmin.MetricsMem | madmin.MetricsCPU
    
    	m := collectLocalMetrics(types, collectMetricsOpts{})
    	for _, hm := range m.ByHost {
    		if hm.Net != nil && len(hm.Net.NetStats.Name) > 0 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 17 15:15:13 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  8. cmd/peer-rest-server.go

    func (s *peerRESTServer) GetMetricsHandler(v *grid.URLValues) (*grid.JSON[madmin.RealtimeMetrics], *grid.RemoteErr) {
    	values := v.Values()
    	var types madmin.MetricType
    	if t, _ := strconv.ParseUint(values.Get(peerRESTMetricsTypes), 10, 64); t != 0 {
    		types = madmin.MetricType(t)
    	} else {
    		types = madmin.MetricsAll
    	}
    
    	diskMap := make(map[string]struct{})
    	for _, disk := range values[peerRESTDisk] {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 52.1K bytes
    - Viewed (0)
  9. cmd/admin-handlers.go

    		interval = defaultMetricsInterval
    	}
    
    	n, err := strconv.Atoi(r.Form.Get("n"))
    	if err != nil || n <= 0 {
    		n = math.MaxInt32
    	}
    
    	var types madmin.MetricType
    	if t, _ := strconv.ParseUint(r.Form.Get("types"), 10, 64); t != 0 {
    		types = madmin.MetricType(t)
    	} else {
    		types = madmin.MetricsAll
    	}
    
    	disks := strings.Split(r.Form.Get("disks"), ",")
    	byDisk := strings.EqualFold(r.Form.Get("by-disk"), "true")
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 98K bytes
    - Viewed (0)
  10. cmd/peer-rest-client.go

    	return resp.ValueOrZero(), err
    }
    
    // GetMetrics - fetch metrics from a remote node.
    func (client *peerRESTClient) GetMetrics(ctx context.Context, t madmin.MetricType, opts collectMetricsOpts) (info madmin.RealtimeMetrics, err error) {
    	values := make(url.Values)
    	values.Set(peerRESTMetricsTypes, strconv.FormatUint(uint64(t), 10))
    	for disk := range opts.disks {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 26.1K bytes
    - Viewed (0)
Back to top